How to constantly move camera on x axis?
Hey Guys, In my game, I want to have a camera that is constantly moving forward but can still see the player and then when the player goes off screen they die. What I am stuck with is that I don't know how to make the camera continuously move forward. Any help will be great. Also, I am new to this so you may need to explain thing a bit more for me. Thanks, Ben
asked Aug 12 '17 at 07:53 AM in Using UE4
You can use PlayerCameraManager for that.
Create your PlayerCameraManager class. Set it in your PlayerController class.
In PlayerCameraManager override function BluprintUpdateCamera. It will update camera every tick.
Now just set new world position to it. For example it can be like:
CameraLocation.X + (GetWorldDeltaSeconds * CameraSpeed)
answered Aug 12 '17 at 08:20 AM
I'm still a bit confused as to the PlayerController class bit but this is what I have done so far and I think I am on the right track, maybe?
answered Aug 13 '17 at 09:41 AM
This will add to the actor's current location every delta second. Make sure that when you create "addlocaloffset" that you choose the one that references your already created camera.
answered Aug 13 '17 at 10:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here