Set Relative Rotation wont rotate component

Hey guys

Im working on an FPS game and want to implement leaning I used “set relative rotatinr” and “set relative location” but only the “set relative location” worked. Im applying this transformation to my fps camera to witch my skeletar mesh arms are attached. I also tried to use the combined function “set relative transformation” but I get similar results. In game my Character only moths 50 units to both side but ignores the 15° rotation. Does anyone know why my rotation wont get applied.

Hey there @HerrSchnuffler! So FPS cameras tend to use this setting:
image

While enabled lets the camera freely move based on the pawn control rotation. However this locks out other rotations, such as your local rotation that you’re attempting here.

Well why don’t we flick that off while leaning? Well if your camera is like this like the FPS template, then you’re going to lose the ability to aim while you lean.
image

So there’s a number of options. Quickest one (assuming you started with the FPS template guy) would be to go to camera, turn off use pawn controller rotation, then go to your pawn and enable these settings.
image

This can and will effect your different controller schemes differently, so with a mouse it works out fine like this:
2022-08-19_21-40-59

This changes how you handle your rotations in the future for the camera as well so be careful. The other alternative is rebuilding the way the character handles the inputs altogether, which is more in depth than this quick fix above.

Let me know if you have any questions!

1 Like

Thank you very much @SupportiveEntity for you fast and extensiv reply. Unfortunatly with the way I setup my character I ran into a problem with your solution. The Pitch Movement with the mouse translates than directly to the capsule witch makes looking up or down unconfinient.

Fortunatly I found another way. With the “Set Control Rotation” you can implement the leaning feature and keep “Use Pawn Control Rotation” activated.

Source: How to implement Leaning – FPS Game Starter Kit

3 Likes

Awesome! Great solution.

1 Like