Shortening the vector to specified length

Hey there fellow devs,

I’ve been having issues with figuring this out so I’m seeking help here.

Please refer to the picture below.

I need to calculate the position of the black point, which represents a point on the line between the two entities (blue line) always positioned exactly on specified radius length (orange circle) from one entity.

I have tried Vector3.ClampMagnitute method but it didn’t work as I would expect.

Any idea how get the position of the black point?

Thanks in advance.

I think you should be able to achieve this by Normalizing the vector (keep direction but make the magnitude one) and then multiplying it by the length you want it to be.

Edit: I’m assuming the issue you’re having is that when the distance between the two entities is less than the specified radius the point no longer stays the same distance away. Could use some clarification on what you mean when you say Vector3.ClampMagnitute method didn’t work as expected.