How to use Mouse aim on 2D Top-down view
Actually i found some questions about similar topic here. there was nice answer about their problem. but it wasn't fit to my needs and i don't good at english so i couldn't modify it by my self.
i will develop my game on 2D Top down view like hotline miami, want to use mouse aim for character rotation but not on movement but i don't know how.
asked Oct 03 '17 at 08:01 AM in Blueprint Scripting
Not sure if there is a tutorial but you can achieve it by rotating the mesh inside of the Pawn rather than the Pawn itself. This way WASD will always move the Pawn in the same direction while the player mesh is facing elsewhere.
Rotating towards mouse cursor is pretty straightforward, here is a version without tracing by channel/object. It places a plane at your character's location, traces a line from the camera towards the location projected by mouse cursor in the world coordinates. When/if the line hits the virtual plane, the mesh in the pawn is rotated towards that location:
The whole logic is in the Pawn and assumes the Pawn has its own camera.
Follow this question
Once you sign in you will be able to subscribe for any updates here