Download

How to lock character "pitch" rotation?

I made a blueprint that allows me to toggle between “walking” and “flying”.

However, I have an issue with “flying” state that I can’t figure out how to fix. I would like the character to not roll over when I move the camera up or down. It causes camera to glitch in flying mode.
Here’s what I mean:

How do I lock the “pitch” for the character in “flying” mode?

Soo… nobody knows, huh? :frowning:

It’s hard to tell why, but I can tell you why I do not face this problem: I use a complete different setup.

I put the pitch input on my Camera(Boom) instead of the pawn and in fly mode i use the pitch of the camera to control via cosd/sind how much Forward and Upward Vector is used as Movement Input Vector. I havn’t experienced any roll-over problems with it.

1 Like

Solely for locking the pitch, there’s the “clamp” node, but there might be a few more problems involved if your character is rotating with the camera

I was about to ask you to share the way you did your blueprint… Because I’m myself is a graphics designer and I’m not really good with blueprints. I don’t really understand how to do what you described.

But then I went through my blueprint, keeping in mind what you said about pitch inputs and… Well, turns out the solution was to just simply break this link:

I don’t even remember why I had it that way in the first place, to be honest.

But basically, now the character behaves exactly the way I wanted to: