I’m trying to get the vector described in the title. Basically, draw a line between the player position and the center of a sphere, and find the point where the line intersects with the sphere. This is the code I currently have:
World Vector Of(Multiply(Direction Towards(Position Of(Event Player), sphereVector), Subtract(Distance Between(Position Of(Event Player), sphereVector), sphereRadius)), Event Player, Rotation And Translation)
This works, but only when the player is facing a certain way since the vector rotates relative to where the player is facing. Is there a better way to find this, or a way to fix/improve the code?