Move pawn with mouse movement

So i want to make the pawn move depending on the value of the x and y axis from your mouse when you hold the right mouse button. Kinda like the blueprint editor but on its local axis because it can rotate.

Thx for any answers!

Hey there @Crewboi69! Are you attempting to just rotate the pawn itself towards the mouse?

This maybe:

Not 100% sure.

2 Likes

Kinda, Imagine the camera looking down and that you drag across the screen like in the blueprint editor but it can rotate around the z axis so it has to move with its local axis.

No move like the blueprint editor mouse movement.

Hi! I’m trying to implement this, but I can’t get it to work. Tried it in level blueprint and in character blueprint, but nothing happens when I hold down my input key (middle mouse in my case).

Anyone have an idea why it might not be working?

Sounds like this is the issue. This should be in a Pawn - that’s what you wanted to move, right? As in the original message.

  • ensure you have a pawn with a floating movement component, possess it and add the script

Also you’re mutliplying rather than adding. Take a closer look at what I posted and compare.

Thank you! Yes, made a mistake there with the multiply. Turns out there were settings in the first person character movement component that was making the movement too small to notice.