Calculation of rotation along a path

I am trying to revive an object, say, its car. I want this to come from a point

x1, y1, z1

to the point x2, y2, z2. He moves to these points, but, apparently, he drifts, and does not indicate the direction of movement. So my question is: how can I solve this problem in my updateframe () event? Could you point me towards some good resources?

Thank.

+3
source share
6 answers

First of all, how do you imagine the road?

, Catmull-Rom . , x, y, z , , Frenet Frenet Frame .

3 : , . , ().

Catmull-Rom, - () . (, t, t- t + - ).

- , , , ()).

+2

, , . . : 1) , , 2) . , , .

0

, , , .

, ( r) n , x- :

x = r.sin(2πt/n)

x- :

vx = dx/dt = r.(2π/n)cos(2πt/n) 

x, y z, .

0

, , , . (. ).

0

, , - , , " ", , , .

0

Source: https://habr.com/ru/post/1699611/


All Articles