Unexpected behavior with SetActorRotation

I have been working on wall-walking, of an arachnid.

I am doing the movement on a Class extending Pawn, and don’t have a controller at the moment. Just feeding it input through the level BP unitl the movement functions are right.

SetActorRotation works as expected when the Actor’s Pitch is 0, with yaw rotating it to the left and right, but when the pitch is changed, the Yaw isn’t rotating around the new Up axis, it’s still acting like it’s on the floor. So, when on the wall the yaw works like a roll, but, the roll still rolls.

How should I correctly apply the rotation’s so that Yaw, is always a Yaw about the Pawn’s own Up axis, not the world Up axis which is what I think it is doing.


I found clues to the answer to this in the post here: link text

So, I don’t know why SetActorRotation doesn’t work right, but this works fine as a work around. This is in my Pawn code.

 FTransform TheTransform = this->GetTransform();
 FRotator rot = FRotator(0, rotationSpeed, 0);