|
I've currently got a script that writes rigidbody.velocity.magnitude of an object to a GUI Text. But the speed it prints seems Very unreallistic, like my standard speed ( a constant relative force of 600) comes out as 20 in speed. What do i do to make the speed how it should be?
(comments are locked)
|
|
If rigidbody.velocity.magnitude is giving you a result of 20, then that's what it is, you don't do anything. Force isn't speed, it's just force...e.g., using a force of 600 with an object that has a mass of 1 will give you completely different results compared to an object that has a mass of 1000.
(comments are locked)
|
|
Hard to know what "it should be", but presumably the velocity is in meters/second, so it may seem less than expected, e.g. 20 m/s = 72 kph = 44 mph. Actually, the velocity is in meters per frame. For framerate independent motion (meters/second), multiply your force by Time.deltaTime.
Apr 22 '10 at 09:17 PM
e.bonneville
No, it's not. Velocity (and its magnitude) is in units per second.
Apr 22 '10 at 09:50 PM
duck ♦♦
Oh, ok. I guess you learn something new every day. I revoted because I was wrong.
Apr 22 '10 at 10:36 PM
e.bonneville
(comments are locked)
|
|
Well, if your results are constantly
(comments are locked)
|
