# Use the mouse in 2D to pan a large image or top down scene?

**URL:** <https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [December 21, 2024, 1:59pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395 "2024-12-21T13:59:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mawilbolou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mawilbolou](https://forums.unrealengine.com/u/mawilbolou)\
**Post date:** [December 21, 2024, 1:59pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/1 "2024-12-21T13:59:07Z")

</div>

Hello, i was wondering how to click and drag at the mouse cursor point to pan a large image in a 2d scene using the mouse?  
Commonly used in image search games.

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [December 21, 2024, 2:10pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/2 "2024-12-21T14:10:39Z")

</div>

Here’s a tutorial 😇

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/1/b219d767858a78c1ab716cd7188d51c497fa5d65.jpeg "How To Create A Top Down Drag Camera Movement System In Unreal Engine (PC and Mobile)") ](https://www.youtube.com/watch?v=s7lopptq5gg)

---

<div class="post-metadata">

**Author:** ![mawilbolou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mawilbolou](https://forums.unrealengine.com/u/mawilbolou)\
**Post date:** [December 21, 2024, 2:18pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/3 "2024-12-21T14:18:38Z")

</div>

Thankyou for the link. I have done this tutorial already, and it didn’t actually work that well.  
As with many of Matt asplands tutorials they are a bit rough and incomplete.  
This tutorial also has no bounds for the mouse so you can keep panning forever. But thankyou anyway for the link.

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [December 21, 2024, 10:20pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/4 "2024-12-21T22:20:21Z")

</div>

Hey @mawilbolou, I didn’t follow the tutorial but here’s what I came up with when I got to launch my PC. It’s super simple!

Here’s the Event Graph of the camera pawn:

 ![Screenshot 2024-12-22 010939](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/3/73398cf1f948cdfc415c96b20b8708530d206738.png)

The collapsed graph:

 ![Screenshot 2024-12-22 012058](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/2/112aa4ae209a135d138864f1673b4e1c54786658.png)

_(IA is swizzled and negated)_

And here’s the result:

Hope this helps! 😇

* * *

> [@mawilbolou](#):
>
> As with many of Matt asplands tutorials they are a bit rough and incomplete.

Incomplete in what aspect 🤔 The tutorial’s not from a full project series. I think his tutorials are one of the best 🥰

---

<div class="post-metadata">

**Author:** ![mawilbolou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mawilbolou](https://forums.unrealengine.com/u/mawilbolou)\
**Post date:** [December 21, 2024, 11:36pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/5 "2024-12-21T23:36:45Z")

</div>

Oh cool, yeah this looks like the answer thankyou I will give it a shot.

---

<div class="post-metadata">

**Author:** ![mawilbolou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mawilbolou](https://forums.unrealengine.com/u/mawilbolou)\
**Post date:** [December 30, 2024, 1:37pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/6 "2024-12-30T13:37:07Z")

</div>

Hello, @VisAgilis hope you had a nice Christmas/holiday day.  
I am using Unreal 4.27 and wondered how this would translate to it?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/c/97c4c3e99f8cc98b820f93dce5ad06a499bac6ce.jpeg)

---

<div class="post-metadata">

**Author:** ![mawilbolou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mawilbolou](https://forums.unrealengine.com/u/mawilbolou)\
**Post date:** [December 30, 2024, 1:54pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/7 "2024-12-30T13:54:03Z")

</div>

I currently have this…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/3/123de92d7710fd86fe7ceb753c7f7bb5604aa48e.png)

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [December 30, 2024, 2:04pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/8 "2024-12-30T14:04:15Z")

</div>

## **Scroll Down to the 2nd Part**

* * *

- Right click on an empty space in the Event Graph, type in “\*” (Multiply) on the menu that pops up and hit enter to place the multiplication node
- Right click on it’s output pin _(the pin on the right side of the node)_ and select the To Vector option under the Pin Conversions section
- Right click on the A pin _(the input pin on the top left side of the node)_ and select the Split Struct Pin option under the Pin Actions section
- Right click on the B pin _(the input pin on the bottom left side of the node)_ and select the To Float (single-precision) option

Here’s what the node should look like at each step:

 ![Screenshot 2024-12-30 165956](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/d/e1db9d4bcaa37ec432dc0f1dae74e29d46a8cf64.png)

* * *

Hold on, I didn’t notice your second post! I thought you were asking about the multiplication node. Yeah UE4 doesn’t have Enhanced Input Actions, you’d use axis mappings there.

Okay just set it up for axis mappings as well, here:

 ![Screenshot 2024-12-30 173202](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/e/eae413ad16731bd979da629d5e2439a8337c3ca8.png)

_(In Project Settings \> Inputs)_ ☝

 ![Screenshot 2024-12-30 173520](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/6/a667597c7f79582bb5a74f2f87efe16ad8187f08.png)

Hope this helps 😊

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [January 6, 2025, 10:15am UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/9 "2025-01-06T10:15:59Z")

</div>

Hey @mawilbolou, it’s been a while since we last heard from you! Did you manage to make it work with axis mappings? Let me know if you have any updates 😊

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 1, 2025, 9:49pm UTC](https://forums.unrealengine.com/t/use-the-mouse-in-2d-to-pan-a-large-image-or-top-down-scene/2235395/10 "2025-05-01T21:49:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
