What are the units of force and mass and velocity?

Post Reply
Brian Beuken
Posts: 46
Joined: Sat Jul 29, 2017 9:19 pm

What are the units of force and mass and velocity?

Post by Brian Beuken »

Small question that is probably obvious but I can't see a clear answer in the forums.

Im trying to work out what the basic unit of mass is, I have read 1kg = 1 unit..

Which would be fine... but then what is the unit of force, newtons or pounds? And velocity, metres per sec, km?

I can't quite seem to get the numbers to work out when I am trying to apply thrust to a 100,000 mass unit ship, with only a few 10's of unit thrusts, that isn't quite fright?

Of course all this are relative to scale and view, but It would be helpful if I could get a sense of what the engine takes 1.0f to be for these values to allow me to make my motion of different size and mass ships seem more realistic as they accelerate due to trust from engines.

https://youtu.be/I5HNSEFYgdM

any insight is much apprecaited.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: What are the units of force and mass and velocity?

Post by drleviathan »

I believe the units of force are Newtons: kg * m / sec^2 because the simulation step expects the duration to be in seconds. You can always use different units by scaling the substep duration and then tweaking your own mass and distance units accordingly. This can sometimes be handy when your world and objects are very big and your speeds are very high (e.g. for spaceships). The problem with using very large objects without scaling your units is the collision margin of shapes are effectively tuned (to avoid tunnelling and interpenetration) for human sized objects moving at human-experience speeds (e.g. most games).

BTW, I advise game developers to NOT apply force/torque and instead blend-in linear/angular velocities. The logic is simpler and you avoid some pitfalls. I see in the description of your video that you tried "calculating linear velocities" yourself but they were not as smooth as you would like. Perhaps you weren't doing it right? In case it helps: here are some threads where I discuss the technique:

viewtopic.php?p=35325
viewtopic.php?p=40055
viewtopic.php?p=42205
Brian Beuken
Posts: 46
Joined: Sat Jul 29, 2017 9:19 pm

Re: What are the units of force and mass and velocity?

Post by Brian Beuken »

thank you this is helpful.
Post Reply