Notifications
Clear all

[Closed] speed help please

hi all

can anyone tell me how to test the speed of a moving object per frame
regards

Nebille

2 Replies

lets say you have you object obj1
get its position at frame 10 (pos1), and at frame 9 (pos2)
create a vector out of these positions vec = pos2 – pos1
which will give you a directional vector

get the lenght of the vector
length(vec)
that is the distance it traveled between frames 9 and 10
speed = distance / time

mark

 PEN

Or

p1=at time currentTime $theObject.pos
p2=at time (currentTime -1) $theObject.pos
velocity=distance p1 p2