How can I make pawn rotate exactly 90 degrees on Y axis with one button press?
I am making a top down game. I have rotation control of the possessed pawn mapped so that you use Q and E to rotate on the Y axis. I need to make it so the pawn ( which is box shaped ) rotates left or right just to the point where the next face of the mesh faces upwards then stops, for each time the buttons ( Q or E ) are pressed and released.
asked Jun 19 '14 at 10:33 PM in Blueprint Scripting
Ok I have setup a demo.
Demo video: Rotating cube demo
Blueprint component setup (notice that spring arm rotation is absolute)
Blueprint Event graph
I have mapped 'E' to 'RotateClockwise' and 'Q' to 'RotateCounterClockwise' (both are Action mappings)
answered Jun 22 '14 at 06:51 AM
Couldn't you use Set Actor Rotation node?
To rotate exactly 90 degrees, you could eitehr add 90 degrees to current rotation using the 'Combine Rotator' + 'Make Rot' nodes, and then feeding it as the new Rotation.
To transition smoothly, use a Lerp node
I'm not sure about this, but I think I saw a node named 'Set Delta rotation' or 'Set rotation offset' somewhere in the blueprint. Perhaps those will do this for you.
Can someone explain how to set it for the character?
answered Oct 03 '14 at 04:55 PM
Can i assign that to my player?
answered Oct 03 '16 at 12:52 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here