Is there a way to make the camera move along a curve, at a certain distance from the player? I’d also like to have the control of the camera rotation if possible… With triggers I would adjust the distance from the player where needed.
Is this something that could be done with blueprints?
Thanks!
Did you try to use a SpringArm with your charcter? You could then modify its rotation to make it move but still keep the same distance from the target. Distance from the player could be modified by manipulating spring-arm length.
The above setup will move the camera along the circumference of a sphere with radius=sprint arm length.
So this is how the component setup would look like:
[Root] —> [Mesh] → [SpringArm] → [Camera]
The camera angle can also be modified by changing the rotation of the camera. (make sure you have disabled ‘Use Controller Rotation’)
Hey, thanks for the tip - I’ve tried it, but it’s not exactly what I had in mind…
I need the camera to move along a curve at a certain distance from the player… The player is going to move along a narrow path and I want the level designer to have full control over the camera position and orientation at any given player position on that narrow path…
I’m sure it’s very simple to restrain camera to move along a curve and use a SpringArm to control the distance from the player?
Ok, so the level designer sets up a path for the camera to follow? And the camera must stick to it, but make sure it maintains a minimum distance from the player?
Looks like you need to setup a number of waypoints(best implemented as a new blueprint). Each way point connects to next and previous waypoints. This defines the path for the camera to follow.
The core job is to find out which waypoint your camera must stick to. This can be achieved several ways. One would be to add an object pointer in your character, which initially points to the first waypoint. But for every tick, you calculate the distance between your character and the camera. IF its is more than the desired length, you move a little bit closer to the next waypoint (use interpolation). Once you overlap with the next point, you change the pointer in your character to that waypoint.
This is just an idea. You will need additional logic to actually make it work. For instance you will need some code to smoothly transition between waypoints (the above method will cause jerky movement). Also it very heavily depends on how the level designer places waypoints.
Yes it might be possible. But how much control you will have over it, I am not sure. I mean I don’t know if you can step through matinee frame-by-frame.