Flying actor Rotates along Z axis as well as goes up on Z axis?

basically when i hit the button to go up which is linked to an axis input in project settings it rotates as well as goes up.

How do i stop it from rotating?

“Get Up Vector” is doing nothing in this case, since the up vector of FRotator(0,0,0) will always be (0,0,1)

Are you doing anything else to the actor, other than Add Movement Input? What movement component are you using?

Hey Thanks for the reply.

I just have the basic “character movement(inherited)” component.

the movement is handle by a get control rotation -> make rotator -> break rotator then get forward vector and right vector to the add movement input

The flying is handle by just using the right trigger axis for up and left trigger axis for down in Axis input. (im suspecting this may be part of the issue to)

When you say “it rotates as well as goes up”, do you mean, it rotates continously or it just rotates to world X and then stops or rotates to the camera direction?

Can you be more specific with what is happening now and what is the desired behaviour?

Sorry I should have been clearer. It doesn’t continuously rotatem it rotates to world X(i believe) and stops. it doesn’t follow camera or character rotation.

Using Add Movement Input is tricky. Have you tried using Add Force in the character movement? It allows you to go straight up, regardless of the orientations, both from the character and the controller.

No I have no tried that as of yet. I will give it a shot! Thanks!

Just so you see what I am working on I uploaded a short play through of where I am at right now. It has bugs and some issues but its starting to come together. I wanted to figure out the movement ai and inventory first. I always get stuck on trivial stuff like what I am expereincing with the flying movement, but I appreciate your help and advice!!

I think I got it!!!

I added Impulse on the press with a +Z and a -Z on the release!!

YAYY!!!

THANK YOU FOR THE TIP!!!

1 Like

This seems to work, without the Float Variable as the base Z Value it was buggy, this made it sure fire for me! Thanks!

Thank god for this forum. I was encountering the same issue with my flying character and this solved it! Thank you.