# How to make 2.5D Side Scroller aim weapon at mouse cursor?

**URL:** <https://forums.unrealengine.com/t/how-to-make-2-5d-side-scroller-aim-weapon-at-mouse-cursor/488287>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [September 1, 2021, 7:52pm UTC](https://forums.unrealengine.com/t/how-to-make-2-5d-side-scroller-aim-weapon-at-mouse-cursor/488287 "2021-09-01T19:52:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8fc00337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8fc00337](https://forums.unrealengine.com/u/anonymous_user_8fc00337)\
**Post date:** [September 1, 2021, 7:52pm UTC](https://forums.unrealengine.com/t/how-to-make-2-5d-side-scroller-aim-weapon-at-mouse-cursor/488287/1 "2021-09-01T19:52:06Z")

</div>

I am trying to get my character’s weapon to aim towards the position of my mouse. Here is the blueprint I am using:

 ![347823-unreal-engine-20210901-1544-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/2/612d3bd220777bd1a962a87eb1d51f5ac577fe5c.png)

This works, but only in orthographic camera view. I need it to work for perspective view, since my game is taking place in 3D, and I’m not sure how to do it. Any tips will be greatly appreciated.

---

<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:** [September 2, 2021, 8:40am UTC](https://forums.unrealengine.com/t/how-to-make-2-5d-side-scroller-aim-weapon-at-mouse-cursor/488287/2 "2021-09-02T08:40:21Z")

</div>

How’s this:

> [@Line Trace from a 3d point to mouse location](https://forums.unrealengine.com/t/line-trace-from-a-3d-point-to-mouse-location/237661/3):
>
> You’re tracing with a fixed distance of 500, replacing the projection’s X with a fixed value. It’s actually hard to imagine how that would look like, a strangely distorted / twisted undulating surface mayhaps? cool, for sure. I want this trace to stay on the same plane as my character, so the X value of the start point & end point should be the same. Consider the following: green_circle create a virtual plane where the character is and point it towards X (Plane Normal 1,0,0) …
