mbray
10-07-2008, 01:35 AM
If I am moving an object with a mouse I would like to determine the value of its speed in the world
mbray
10-08-2008, 06:03 PM
I use a while (true) event. First determine and set variables equal to the left, up and forward values of my object from something fixed (I use the ground). Then wait a second or whatever and then get the differences between my objects current three axis positions relative to the ground and the saved variables. Then use those differences to calculate distance sqrt(dx^2 + dy^2 + dz^2). Then I have the distance traveled over the past second or whatever my wait was.
DrJim
10-10-2008, 12:29 PM
A very nice solution. Thanks for positing it. :)