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.
asked Mar 20 '18 at 07:36 PM in Blueprint Scripting
"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...
answered Mar 20 '18 at 07:46 PM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here