Calculate Distance From Forward Vector to Desired Axis Value

Hello, I have been trying to create a function that creates a line trace a certain length but ends if it reaches a given Axis (Axis Value change constantly). The line trace starts from the camera forward vector and should end once it reaches the given axis value (end as in the length of the line trace not the function).

This way no what angle i look at the axis the line trace will adjust itself to reach that point.
The question is how would

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?

i can provide more screen shots if needed :slight_smile:

1 Like

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

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

2 Likes

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