Hi !
I’m trying to write from scratch, a simple pathfinding/object avoidance script.

my question is, how do I calculate a Vector3 coordinate, from a given origin Vector3 (my object position) and a raycast (that doeasn’t hit anything)

While of course is easy to get the raycast hit coordinates for the right ray (the one hitting the box) what i want to know, is the vector3 coordinates, of the red point, given the “observer” transform, and the left raycast direction, and a choosen max length (in this cas the red dot)

You can calculate that yourself using the parametric formula for a line in space.

Refer to this article on parametric equations, and notice in particular the Line example. That is in fact how ray casting works, and it is the reason you need two vectors; a starting point (a0, in the article) and a direction (a1, in the article). The max length you want to go is the parameter, t.

If you have the starting point and the direction you are going in as normalized vectors, then the position of the red dot equals,

RedDot = a0 + t*a1.

As an example, let’s say the bottom box is at (0,0,0), and the direction you’re shooting is (-1,1,0), and you want to find the red dot at a max length of 5, then the coordinates of the dot is RedDot = (0,0,0) + 5*(-1,1,0) = (-5, 5, 0).