# Cannot Get an Axis Locked Cursor Location

**URL:** <https://forums.unrealengine.com/t/cannot-get-an-axis-locked-cursor-location/1990604>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [August 24, 2024, 10:10pm UTC](https://forums.unrealengine.com/t/cannot-get-an-axis-locked-cursor-location/1990604 "2024-08-24T22:10:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keremikzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keremikzz](https://forums.unrealengine.com/u/keremikzz)\
**Post date:** [August 24, 2024, 10:10pm UTC](https://forums.unrealengine.com/t/cannot-get-an-axis-locked-cursor-location/1990604/1 "2024-08-24T22:10:09Z")

</div>

I want to write a logic to spawn spheres on a locked x position but because i calculate the location by adding the direction, it distorts on the edges so the objects spawn on the edges are closer to camera.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/7/8b707d3d607c648127dae0440e9bb81cfa21ea35.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/c/e9cdffa4dd721be9de610c63f7150fbc2d3c3f79.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:** [August 25, 2024, 8:30am UTC](https://forums.unrealengine.com/t/cannot-get-an-axis-locked-cursor-location/1990604/2 "2024-08-25T08:30:44Z")

</div>

Yup, you’re tracing on the inside of a sphere who centre is at the camera location.

* * *

You’ll need `Line Plane Intersection`:

> [@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) …

> [@Left Mouse button pressed and released equivalent in enhanced input (or drag and drop)](https://forums.unrealengine.com/t/left-mouse-button-pressed-and-released-equivalent-in-enhanced-input-or-drag-and-drop/1633884/18):
>
> Here’s some script allowing for picking up stuff and moving it in a specific plane only we determine ourselves manually: The green debug plane visualises what’s going on. In short: shoot a beam (trace) from the screen centre towards the projected mouse cursor, when it eventually intersects that plane (which is infinitely large), place the actor at the intersect world coordinate. If I change the normal: You could derive this Normal from the actor itself instead:
