Rotate Actor to Mouse Position on XY axis

I don’t understand why it won’t work. What am I doing wrong?

Right now you’re getting the mouse position in screen space (X pixels from left, Y pixels from top) and your actor is in your game’s world space. You’ll need to use the screen to world space node to convert screen space to world space.

Then use the vector that comes out of that node with the find lookat rotation node. Start would be the actor’s location, target would be screen to world location. Then the resulting rotator is what you’d use to rotate the actor.

Done, but it still does not work, when I hit play, the camera is spazzing out and the character is rotating like posessed by a demon.

Oh, sorry, brain lapse. You don’t want to get the location or set the rotation of the player controller. Drag out of the player controller and get controlled pawn. Get its location and set its rotation instead.

&stc=1

That definitely worked, but now the character model is reversed, the front is the back and the back is the front.

EDIT: I figured out how to keep him on one axis by using break rot && make rot, but the model itself is still reversed.

You might want to use the “Use Controller Rotation Yaw” option of the pawn and set it to true, that will make the character follow the mouse direction and you don’t need anything else.

@anonymous_user_19b57f8a, you were correct, it works perfectly fine now, and I didn’t have to use all those boxes :D!

Thank you!

I’m using your technique to turn my Pawn but when I try to move forward/backward or right/left my Pawn is having very weird rotation as you can see on this gif: http://i.imgur.com/6ZIEzYo.gifv :confused: