How can I rotate a pawn?

I have a pawn as main character and I want it to rotate according to the asdw keys. How is the best way to so this??
i Try using set actor rotation, but when I collision with something, my pawn stop moving.

“Set Actor Rotation” is what you would use if you want something to “spin” indefinitely OR if you would like to “instantly” rotate one actor/character/pawn etc to face another actor/pawn/character. What you want is “movement control” correct? You don’t want to “rotate” per se as much as you want to “turn” your main character to face a direction of your choosing? Assuming this is the case what you want is to go into project settings, input, axis mapping, and “map” a key to rotate the player around the Z axis. Add axis mapping by clicking the little “+” next to the Axis mapping settings. Then just pick whatever key you want, say “D” and set it to 1.0, then add another axis map and set “A” being the opposite of the D key by convention and set it to -1.0. Then go to player controller, or player character wherever you like and right click in the event graph, search for axis mapping (Whatever Name You Chose) and use that to add input “yaw”. And you’re done. Should look like this…

1 Like

Yeah, I want movement control. I do what you say, but what moves is the camera and not the mesh. Has something to do that is a pawn instead of a character?

So you do want to just spin an object/character around? Haha Here, this will do that then.

Replace “Cube” with [Your Desired Mesh]

Nono, I explain myself better: I want to have a pawn as if it were a character, with the rotation control that the character has, but in a pawn.

So, your question is kind of confusing now. The difference between a “character” and a “pawn” is basically how much more “functionality” they provide you with out of the box. So a pawn can do everything a character can but you will have to “code” more yourself which gives you more flexibility in what you can do. I don’t know what “character” in particular you want. Because the first person character moves differently than the 3rd person. The first thing i told you about gives 1st person perspective, the second one I showed you is more 3rd person controls where your player can rotate independently of the camera view. So again not quite sure what you are going for here.

Sorry, I didn’t mentioned that it is a 3rd person. But the second option you told to me it’s not work like a 3rd person of a character blueprint. It rotate but not like a “rotation control” perfect

Got you, I am messing around with it right now I see the issue. Haven’t worked much in 3rd person though. Might need a camera boom and use that to rotate around the pawn as a focal point. Have you tried looking at the 3rd person template and seeing how Unreal handles the controls?

Yeah, I see the third person template of Unreal, but i can not see where implemented the control rotation. Thanks for interesting in it. If you find the solution I will be very grateful

Figured it out, you need a “spring arm” and to set a couple things in the details panel I have provided screen shots. Now it rotates “around” the 3rd person character as you like. Also this is in a “pawn” class BP, no issues or reason it needs to be in a “character” class. Hope this helps.

I forgot to show you the “player character (self)” settings, so I went back and took a screen shot but I had already switched the class back to being the regular character BP, so that is why the components panel in the final image is different from the first two, but it works either way with these settings.

You didn’t understand me. You explain me how to rotate the camera, but i want to rotate the mesh in a pawn. The camera works perfectly, but the mesh don’t rotate when I move.

I find some information and I want “Orient rotation to movement” in my pawn. In character Blueprint this a check in the character movement, but in a pawn this check doesn’t exist and my pawn mesh don’t rotate.

Any other solution??

If you want more help post a video or a link to the “rotation” you’re trying to achieve because I don’t even understand what you’re trying to do anymore. I’ve rotated everything you could possibly rotate in a player character and it’s not what you want so I stopped trying.

Someone else tried the same thing a couple years back, they ended up just using the character BP. Any particular reason you don’t want to use the character BP?

I want that to 3rd person pawn works like 3rd Person Character, and what I want is to orient the mesh according to his direction but without using “Set rotation”. I do not use Character because of the collision. The Character collision is a vertical capsule but my character is a dog and the vertical capsule it’s not appropiate.

Thanks for your patience

Is this what you want it to look like?

If this is a pawn, yes. How did you do it?