# Move pawn with mouse movement

**URL:** <https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947>\
**Category:** Blueprint\
**Tags:** move, unreal-engine, pawn, Blueprint, question\
**Created:** [March 3, 2023, 1:00pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947 "2023-03-03T13:00:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crewboi69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crewboi69](https://forums.unrealengine.com/u/Crewboi69)\
**Post date:** [March 3, 2023, 1:00pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/1 "2023-03-03T13:00:40Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 3, 2023, 1:07pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/2 "2023-03-03T13:07:43Z")

</div>

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

> [@How to rotate pawn using mouse in #UE4](https://forums.unrealengine.com/t/how-to-rotate-pawn-using-mouse-in-ue4/631567/14):
>
> See if you can get it to work this way; hope I got it right. You can validate the get node like so, btw:

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 3, 2023, 1:12pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/3 "2023-03-03T13:12:24Z")

</div>

This maybe:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/3/293152b3457d322709eefb312eb065ad6e8cc9b9.png)

Not 100% sure.

---

<div class="post-metadata">

**Author:** ![Crewboi69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crewboi69](https://forums.unrealengine.com/u/Crewboi69)\
**Post date:** [March 3, 2023, 5:46pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/4 "2023-03-03T17:46:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Crewboi69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crewboi69](https://forums.unrealengine.com/u/Crewboi69)\
**Post date:** [March 3, 2023, 5:46pm UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/5 "2023-03-03T17:46:53Z")

</div>

No move like the blueprint editor mouse movement.

---

<div class="post-metadata">

**Author:** ![Andreas\_Bjorshol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andreas\_Bjorshol](https://forums.unrealengine.com/u/Andreas_Bjorshol)\
**Post date:** [March 6, 2023, 10:11am UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/7 "2023-03-06T10:11:01Z")

</div>

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?

 ![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/8/348789ac761af431331314295e94d586868dda59.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 6, 2023, 11:36am UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/8 "2023-03-06T11:36:50Z")

</div>

> [@Andreas\_Bjorshol](#):
>
> Tried it in level blueprint and in character blueprint

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.

---

<div class="post-metadata">

**Author:** ![Andreas\_Bjorshol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andreas\_Bjorshol](https://forums.unrealengine.com/u/Andreas_Bjorshol)\
**Post date:** [March 7, 2023, 9:21am UTC](https://forums.unrealengine.com/t/move-pawn-with-mouse-movement/782947/9 "2023-03-07T09:21:05Z")

</div>

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.
