# Calculate Distance From Forward Vector to Desired Axis Value

**URL:** <https://forums.unrealengine.com/t/calculate-distance-from-forward-vector-to-desired-axis-value/1606632>\
**Category:** Blueprint\
**Tags:** forward-vector, unreal-engine, question, Blueprint\
**Created:** [January 11, 2024, 3:09pm UTC](https://forums.unrealengine.com/t/calculate-distance-from-forward-vector-to-desired-axis-value/1606632 "2024-01-11T15:09:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [January 11, 2024, 3:38pm UTC](https://forums.unrealengine.com/t/calculate-distance-from-forward-vector-to-desired-axis-value/1606632/2 "2024-01-11T15:38:37Z")

</div>

It’s a bit hard to make sense of this.

> [@Q-18S](#):
>
> The Question: Is there a way to calculate the distance from the player/camera forward vector to the desired x axis in a 3d space?

What is “the desired x axis” ?

Do you mean you want to trace forward until X = a certain value ?  
In this case, you are tracing towards a plane, defined by its X value.  
Look into this post maybe that’s what you are looking for

> [@Hard times getting mouse position in 2.5D platformer](https://forums.unrealengine.com/t/hard-times-getting-mouse-position-in-2-5d-platformer/1592560/2):
>
> You can use [Line Plane Intersection (Origin & Normal) | Unreal Engine Documentation](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/Intersection/LinePlaneIntersection_Origin_Nor-/) to get mouse intersection on a given plane: Hope it helps.

---

_[View the full topic](https://forums.unrealengine.com/t/calculate-distance-from-forward-vector-to-desired-axis-value/1606632)._
