Useful Functions doesn't work
#8

Pythagoras states that when a is the hypotenuse of a triangle, and b and c are the other sides, a^2 = b^2 + c^2.

If you have a line going from one corner of a cube to the opposite, the length of the line is root(side x side x side). So to find the distance a player moved since the last time you checked, work out the difference in X Y and Z, square these differences, add them, and root the lot. This gives you distance...

Speed = Distance/Time... you know Distance and Time by this stage, so you can work out the players speed.
Reply


Messages In This Thread
Useful Functions doesn't work - by Remi-X - 18.05.2009, 17:42
Re: Useful Functions doesn't work - by Weirdosport - 18.05.2009, 17:48
Re: Useful Functions doesn't work - by Remi-X - 18.05.2009, 21:22
Re: Useful Functions doesn't work - by Weirdosport - 18.05.2009, 21:24
Re: Useful Functions doesn't work - by Remi-X - 18.05.2009, 21:32
Re: Useful Functions doesn't work - by Weirdosport - 18.05.2009, 21:39
Re: Useful Functions doesn't work - by Remi-X - 18.05.2009, 21:59
Re: Useful Functions doesn't work - by Weirdosport - 19.05.2009, 00:16

Forum Jump:


Users browsing this thread: 1 Guest(s)