Calculating rotation along a path

前端 未结 6 387
暖寄归人
暖寄归人 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:18

    You need to work out the initial orientation of the car, and the final orientation of the car at its destination, then interpolate between them to determine the orientation in between for the current timestep.

    This article describes the mathematics behind doing the interpolation, as well as some other things to do with rotating objects that may be of use to you. gamasutra.com in general is an excellent resource for this sort of thing.

提交回复
热议问题