Camera Boom, there is no Get World Location C++
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 :
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.
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 :)
asked Oct 25 '14 at 03:17 PM in C++ Programming
You have GetComponentLocation which tells you the world position of the Camera Boom :)
answered Oct 25 '14 at 05:55 PM
Well i did what i wanted, just to help if anyones has the same question about how to move camera boom, i'm explaning what i did to achieve smooth transition.
First, I added 2 Child Actors in MyCharacter Blueprint, and selected them as TargetPoint. One is over right shoulder, the other one is over left shoulder. ( camera is set up in right shoulder in start )
This is what i used with comments;
Follow this question
Once you sign in you will be able to subscribe for any updates here