AIController with Pitch != 0

Hi,

When creating wall-walking NPCs using our middleware, we hit the problem that the AIController will ignore the Pitch component of orientations in

AAIController::UpdateControlRotationi.e. it will keep the controlled actor vertical, even if (for example) the CMC->GravityDirection has been modified.

In order to avoid our clients needing to make engine changes, it would be preferable if this could be fixed in the AIController. A possible implementation would be a public boolean member of the AIController to disable zero-ing of the Pitch. Would you be able to add that in a future release?

Peter Creasey

Mercuna

Steps to Reproduce

Hi Peter,

This is something that I remember getting a request about recently (within the last year at least). The reasoning behind this restriction has been lost over the years, but we are open to adding an ability to toggle this. Our original plan was to allow pitch for non-Pawn focused actors, but I believe from your post that you want to change the pitch even when not focusing on a specific actor. Am I correct in that assumption? I simply want to ensure our solution would also address your needs.

And your idea for possible implementation is very similar to what I recall being discussed by the team about this issue. :slight_smile:

-James

Hi James,

Yes, we are looking to request an orientation (including a pitch) without using a focus Actor. A toggle to allow this (that could also be changed via C++) would work for us.

Best,

Peter

Hi Peter,

That makes quite a bit of sense. I will find some time to add this to the engine. It will not be in a release until 5.7 since a public header change would be required.

-James