How do I change the default controller rotation limits?

Seems that default PlayerController pitch and roll is limited between 90 and 270 degrees, I want to be able to rotate it and make full spins, is there some way to disable the limit?

PS. I´m using blueprints.

Thanks.

1 Like

Both FPS template and also starting from scratch by myself. The controller assigned values for pitch and roll does not accept values below 90º or over 270º. I hope I´m wrong and this is not hardcoded because seems like a very FPS oriented solution to avoid look past your feets when you look down.

PS: Flying UFO example does not have this problem because does not use a controller instance as main primitive for the ship. Anyways looks like a ugly limitation and maybe UE should create an option to enable/disable this limiter behaviour.

Hey mdiaz,

Are you working out of one of the available Templates or is this happening for you using a PlayerController in a blank project?

-Steve

Hey mdiaz,

Sorry for the wait time on reply. What you will want to do to have a different set of axis limits is create a new blueprint based on Player Camera Manager. Within that blueprint is a section that lets you set Min and Max values for Pitch, Yaw, and Roll:

Once you make this new blueprint, to use it with your system you’ll need to edit the Defaults of your PlayerController and look for the Player Camera Manager Class option–set this to the blueprint you just made.

If you have any other questions about this setup, just let us know!

Thanks,

-Steve

7 Likes

Oh, nice to know it. It makes sense.

I already managed to solve my issue in an alternative way but this solution will help some other people for sure.

1 Like

This solution doesn’t seem to work for me (on 4.1.1). It is having no effect changing those values. Unless there is something additional that has to be (un/)set that was not listed above (except setting the custom controller, which I have done, and is working up to that point)? I started from the blank template.

Also, mdiaz, I’m curious to what the alternative way was that you found?

In your World Settings or Game Mode blueprint, you are pointing to your custom Player Controller to be used in your map, correct?

Yes, I have. (Sorry for very late reply, I never got email notified?) I still haven’t figured it out, I just moved on to another problem.

Is the problem you are running into that you can’t move past your new limitations or are you hitting gimbal lock?

My problem is that the Player Camera Manager Class (that I have set) seems to have no effect at all (or at least the pitch/yaw/roll min and maxes). Or maybe I’m failing to understand something, since I’m slightly new to Game development concepts.

Can confirm no attributes are having an effect inside of the Player Camera Manager class.

To reiterate what I have done: (I’m now on 4.2.1)

  1. Created custom gamemode and set it in both World Settings and Project settings → Maps & Modes
  2. Created custom controller and set it ‘active’ inside the (custom) game mode settings above.
  3. Created custom player camera manager and set it ‘active’ in the player controller settings and played with settings. (This is where things start to have no effect.)

The camera component is attached to a custom actor. So have I forgotten something?

If you possess a Pawn and try to rotate it in any direction, you’ll be limited to 90 degrees in any direction. It’s a bug acknowledged by Unreal developers.

However, if you do the rotation in your custom PlayerController blueprint, you can freely rotate 360 degrees without limit. The rotation values (roll, yaw, pitch) can even exceed 360 degrees and it’ll work perfectly. So rotate the actor from within your PlayerController blueprint instead of your individual Pawn blueprint.

Hey Steve Allison, i came upon this post today because im trying to limit my player’s head rotation so he cant fully rotate at the neck and other unrealistic rotations. Can you explain in detail how i can get to the player camera manager settings? i cant figure out how to find that.

Hi Steve,

I’m having the exact same problem as Jonbo was. I’ve created a CustomPlayerController, set the min/max pitch to -60 and 60 and then set that CustomPlayerController as the PlayerControllerClass in the game mode settings but, still, I’m able to rotate pitch all the way to -90 and 90.

Any ideas?

This should work if you want to apply vertical constraints

2 Likes

Thank you! exactly what i needed

This doesn’t seem to work in a custom Player Controller BP. It still stops at 90 degrees.

I just tried this, and it works like a charm! Thank you so much for showing your method on this subject.

It doesn’t work for me, I made the same logic in my controller blueprint but the values seams to have no effect at all. I tryied using the default camera manager and making my own camera manager but it’s still the same.

EDIT:

I can verify that this works.

If you move your entire rotation script to your custom PlayerController event graph (do all of your rotation here), it works flawlessly.