I have two vectors defining two separate points in a three-dimensional space. One is static at the origin (0.0f, 0.0f, 0.0f) and the other one will be moving slowly. From this data i need to get a (three-dimensional) direction vector that describes the direction from the moving points current position to the origin.
The moving point will be a directional light (3D game) that always myst face the origin.
I don’t require any code, just basic information on how to calculate the vector.
If you have a point in space, and you want to know the direction to the origin for it, surely it’s just the negative of the point, normalised to unit magnitude if you want a pure direction vector.
Origin <- (x,y,z) = (0, 0, 0) + l(-x, -y, -z)