Hello everyone, I am new to Unreal, recently I have made some improvements to character in third person template with blueprints, what i did was we can zoom in, zoom out, press F to change camera to shoulder to shoulder, shoot projectiles, rotate some skeletal mesh vs. Now, i am trying to achieve my character by not using blueprints but using C++. And I am stuck at very beginning :D. I was able to create a smooth translation for zooming by adding & substracting some values through Tick event, to / from Camera Boom’s target arm length. Now I am trying to make camera boom move to a little right & left if player presses F button, to make player be able to change shoulder in third person game. When I used blueprints, what i did was when player presses button, open a gate which Tick enters, and then use Set World Location, using VInterpTo. In VInterp parameters, I was able to set current location as CameraBoom ( take out a pin ) Get World Location and then same for target point. But in C++ i got stuck here, in visual studio when I do this :
CameraBoom->GetWorldLocation
nothing pops up, there is RelativeLocation, there is SetRelativeLocation, there is SetWorldLocation, but not GetWorldLocation or WorldLocation
I don’t know what to do, if I try doing it using relative location, it only translates when mouse is been hovered by player ( don’t know why ) So I need a little help here.
CameraBoom->SetWorldLocation(FVector(CameraBoom->RelativeLocation.X, FMath::FInterpTo(CameraBoom->RelativeLocation.Y, originalY - 65.0f, deltaTime, shoulderChangeSpeed),CameraBoom->RelativeLocation.Z), false);
// still can't do it if I use SetRelativeLocation
Why can’t I use GetWorldLocation in C++, what is the best way to translate camera boom smoothly, if it was for zooming i know i would use targetarmlength which i did, but now I am trying to translate it sideways with smooth motion. Can you help out ? Thanks in advance