Calculating rotation along a path

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

    I think interpolating is giving the drift you are seeing. You need to model the way steering works .. your update function should 1) move the car always in the direction of where it is pointing and 2) turn the car toward the current target .. one should not affect the other so that the turning will happen and complete more rapidly than the arriving.

提交回复
热议问题