Lock camera Z axis of third person camera

Could you teach me how to lock the third person camera’s Z axis when the player jump? But I need to keep X and Y axis as usual following the player. I thank you so much. (I was very tired to fix this issue).

Hi Wong,

I was able to achieve this effect in the third person BP content example. Open the ThirdPersonCharacterBP and add what is in the screenshot to your character.

The timeline is so that it lerps 0 to 1 over a second and is a smooth camera transition. I collapsed a couple nodes into the node named “SetCameraCar” here is what that looks like.

Let me know if that helps,

a lot. I have tried following your idea, it very close what I want, but the player camera goes down a bit once the player land. I don’t know why.

I would need to see your event graph to determine what is going on. It sounds like you aren’t lerping correctly from the camera’s current relative position on landing to the camera’s relative position that is stored when starting the jump.

Make sure that the values are set up correctly like in the graph and that the float output for the timeline is going from a value of 0 to 1 over 1 second. Also make sure that you are using the correct location nodes where I have them in the graph. Notice that I use both set world location and set relative location.