How to limit the rotation angle of SpringArm

Hello, everyone, I’m making a simple flight game demo. I need to realize that the camera rotates with the aircraft, and my mouse can also rotate the angle of view. How can I limit the rotation angle of SpringArm to fix the error shown in the following figure?


GIF 2023-2-13 21-39-55
This is the correct example of a game. How can I achieve this effect?
GIF 2023-2-13 21-33-46

Hi there @xgewdyttx. Hope you’re well.

This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile:

Hey @xgewdyttx!

So what you’ll use here is a “Clamp (float)” node! It will restrict a number from increasing or decreasing past the set threshold!

image

やあ@xgewdyttx!

ここで使用するのは「Clamp (float)」ノードです。設定されたしきい値を超えて数値が増減するのを制限します!

The first vid looks like it is using relative rotation and the second video looks like it is using world rotation. Or it is using X for the roll, it’s kinda confusing.

@jay001020 Good catch. There’s an extra movement on the second vid, a delta x roll.

@xgewdyttx The third motion, where the camera spins above the jet, would be on the Delta X axis.

I suggest adding an input button to lock Y and Z delta and while button is held (CTRL/mouse3) make the mouseX modify the Delta X rot.