when rotating a spring arm, how do I stop it from going upside down and reversing my controls? or how do I make a point to track, that wont reverse controls like spring arm does?

Hello, I have a 3D spaceship with aiming, but whenever I rotate the spaceship around, the controls get flipped upside down because the spaceship is now upside down.
how do I keep the spaceship always facing up?
here is video to demonstrate my problem: https://www.youtube.com/watch?v=iMc6LA7ogCs
and here is my code:


if this is impossible to do, how do I make my spring arm / projectile spawner to point/track towards a point, that I can move like in my video, without it flipping upside down and reversing my controls?

here is the blueprint pastebin of the code if that helps

Try multiplying the mouse Y value by -1

Hello, this didn’t work
do you know other ideas I could try that could work?
it needs to always move the arrow up when I press up, even if its flipped upside down which reverses the controls.
same with pressing it right would move the arrow always right, eventho its reversed due to being upside down.

I might help but unfortunately I can’t access the video link sometimes.(my web signal issue :joy: )
if possible could you upload a small and short version to the forum?

Are you wanting the camera to rotate with the ship? If not disconnect camera from control rotation, to stop the inversion of controls simply add rotation on key event: get local rotation → split and pull off(probably x) → and or subtract 1(maybe more for faster rotation) then plug that into set rotation, or utilize the “add rotation node” to bypass these manual steps, for spawning a projectile id recommend plugging in the actors rotation, though you may want to then rotate the actors world rotation not local rotation for the previously suggested solution

Make the whole thing by adding rotation rather than setting it.

1 Like

Hello, I added “substract” -1 to X between "relative rotation X (roll) and “set relative rotation” new rotation X, but it just kept spinning it slowly like it was animated.

Also, instead of using “set relative rotation” node at end of the code, I tried different nodes like:
“add world rotation”
“add local rotation”
“add relative rotation”
which all just made my arrow spin wildly, even when I wasn’t moving my mouse.

Did I do it wrong or something?

Try running a check if the value of mouse or gamepad input is greater than a certain value, almost like a dead zone, to prevent constant roll

You’re using a deprecated legacy input system that fires every frame regardless of input.
Either use the Enhanced Input System (a new standard as of UE5) that Triggers only when input is detected, or ensure to gate input when the player does not fiddle with the controls:

image

You’re also missing delta time in your calculations - meaning it will all be frame dependent, which is undesired in most cases.

1 Like

To prevent a spring arm from flipping upside down and reversing controls, you can enable the “Use Pawn Control Rotation” option or limit the pitch rotation to avoid extreme angles. Alternatively, use a separate camera tracking system that maintains control consistency regardless of orientation, ensuring smooth tracking without inversion.

Hello, sorry this is hard for me to explain, it flips it with the pawn control rotation too:

when I use 3rd person character, I have the camera behind me
without turning I move the camera above my character so I see a top down view, and then without turning the camera I move the camera in front of my character and the camera is now upside down.

but instead of disabling that motion from happening, I need this exactly same motion as here, but somehow never get it flipped, which I think might be impossible?

This system is for aiming projectiles only and not for the camera, so I imagine there is a better way to do this?

TLDR : aiming system that I can move in a motion of a cut in half 3D sphere, where it starts pointing up always when pressing up and always pointing left when pressing left no matter what orientation it is in