Calculating rotation along a path

前端 未结 6 385
暖寄归人
暖寄归人 2021-01-03 09:52

I am trying to animate an object, let\'s say its a car. I want it go from point

x1,y1,z1

to point x2,y2,z2 . It moves to those points, but

6条回答
  •  孤街浪徒
    2021-01-03 10:23

    going from one position to another gives an object a velocity, a velocity is a vector, and normalising that vector will give you the direction vector of the motion that you can plug into a "look at" matrix, do the cross of the up with this vector to get the side and hey presto you have a full matrix for the direction control of the object in motion.

提交回复
热议问题