How to smoothly rotate the Y axis

I have a 2.5d game of airplane which moves just in the Z and X (forward) axis’ and my rotation is just in the Y axis, but when I rotate in this Y axis without using FInterp the rotation is pretty bad and it gets flickering after a certain amount of time or after hitting the ground. But when I use FInterp I have a gimbal lock issue, which I just can rotate to 90 degrees and -90 degrees it means that I can’t go backwards. I wish I could have a way to rotate this airplane without any problems, thanks.

This is an 2.5d airplane that goes to where the user is pointing to (joystick) i’m using add impulse to go to the desired location

the issue (at the moment) may not be gimbal lock… it may be the pitch limits on your Player. This is locked to +/-90 in your Player Camera Manager BP. Just make a custom Player Camera manager BP, change the Min and Max Pitch to +/-360, make sure you nominate your custom Player Camera Manager BP in your Player Controller BP settings.

Depending on your other settings… gimbal lock and/or an odd spring arm twitch at +/-90 (caused by spring arm lag settings) may THEN arise… but let’s see if this fix solves everything first :slight_smile:

Don’t know if the answer below will be sufficient, if it is cool, if not and you do experience true gimbal lock you can avoid it with quaternion rotations as shown in this tutorial.

The first attempt didn’t work, what do you mean by this spring arm stuff ?

if you are using a first person camera on your aircraft, you don’t need to worry about it…

if you are using a third person camera… a spring arm component is often used (it’s basically a camera boom with a bunch of options)

Yeah I know, I’m using this spring arm, but u said “but let’s see if this fix solves everything first :)” so how can I fix it with the spring arm ?

did you:
-set up a custom player camera manager BP with revised pitch limits
-nominate it in your player controller BP

Yeah I did it didnt work as I said

Try the quaternion solution I linked to above.

Nebula how do I make this thing smooth now ? I’m using degrees and the only way I know to make it smooth is using FInterp, how I do it with quaternions ?

Is FQuat::Slerp the right way ?

Still having problems with it, I set up the rotation but now I don’t know how to make it smooth @NebulaGamesInc thanks for the attention.

Try using add local rotation not set rotation. If your joystick is an axis event this should work fine. It is how I get smooth rotation with flying pawns. In the video i am pretty sure I added local rotation.

@NebulaGamesInc Its a joystick I cant add rotation to this Pitch, the rotation of the airplane should match the rotation of the Joystick, if it is 90 degress the airplane will go 90 degrees as well, I know you may think that I could get the rotation of the airplane so if the rotation matches I should just stop rotate, but I not being able to do this and I think its not possible, I’ll probably make another question related to this later, but thanks yall for the attention again.