create a vector to origin, another to hit, substract them (hit-orig), store its length, store another value which is less by the desired distance, use normalize to decrease the full length to the shorter length, and add it to origin vector to get the point.


Free world editor for 3D Gamestudio: MapBuilder Editor