Reputation: 1
Can't calculate speed based on that.
I'm using paths to move objects so built in direction is speed is always zero?
How can I calculate the real speed of the object?
No matter what xprevious is always x and y previous is always y.
Upvotes: 0
Views: 227
Reputation: 3202
The speed that you've originally set an object to follow a path with can be found in path_speed
variable, but for paths with varying per-point speeds you can calculate it yourself by checking distance in an End Step event:
spd = point_distance(xprevious, yprevious, x, y);
Upvotes: 1