Controlling a Pawn with the Mouse

Hi everyone, I’m extremely new to UE4 and have run into a bit of a road block. Basically I’ve got a PlayerController, Pawn (DefaultPawn) and GameMode on a blank project and what I am trying to do is make it so that my Pawn will move towards the position of my cursor when I right click anywhere on the world (Think Diablo style movement). I’ve tried a few methods I’ve seen online but none seem to be working.

If anyone is able to help me create this I’d greatly appreciate it.

Hello, i would suggest you to open the top down template, the character movement there is similar to what you want. Take a look on how they made that and you will be able to do too =)

Thank you for the reply, my only issue there is that the Top Down example uses a character rather than a pawn. Will it transition fine?

If you undrstand the logic it should not be a problem. Give a try if you have problems just ask again =)

It doesn’t seem to be moving my Pawn. I’ve basically recreated what the TopDownExample had. I get the feeling the Controller isn’t “connected” to the Pawn. I have the GameMode set to have my Pawn as the Default Pawn, my Controller as Player Controller and I’ve set the GameMode in the Worldsettings.

Im not with ue4 here right now but inside your pawn class defaults have you set the controller? I mean inside your pawn blueprint

Do you mean AI Controller Class? Changing that from the Default AIController doesn’t fix it but it has changed the camera from the one attached to the pawn to the Free Move Camera.