Can you help me?
I got two points(X,Y,Z) A and B in space.
How can I find the look vector from A to B grom a given moment?
I mean, at zero frame, “A” got no rotation at all.
And at frame 10, for example, “B” move 10 units on -X. How can I calculate the angle I have to rotate in “A” to continue viewing the “B” coordinate ?
- lookAtVector = pointB - pointA
- I am not sure But try this
a. value = ((pointB.x - 10)/lookAtVector.z)
b. angle = arctan(value);
Bangalore - 1
search for ‘The Matrix and Quaternions FAQ’
Q39. How do I generate a rotation matrix to map one vector onto another?
although How can I find the look vector from A to B grom a given moment?
is simple A-B perhaps normalize the result
The vector from A to B is B-A. It’s always target minus source