Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Mass is one of the basic scalar quantities, which is required in most rigid body physics calculations.

Does every, EVERY, object which moves in a game get mass defined in the code, or is it allotted by the rendered object's size? (Size should not be the solution though, since density also comes into play :/)

Example question...

How does the physics engine handle mass in, say, Frostbite (Battlefield 3)?

share|improve this question
From my experience, mass is either defined by a base "type" (e.g., wood, rock, water, flesh, weightless) with a scalar value associated with the type that calculates based on the object size, or an individual scalar value (e.g., pounds, kilograms). – Djentleman Jan 3 '13 at 8:49
up vote 1 down vote accepted

Might as well make this an answer.

From my experience, mass is either:

a) A global value that applies to all spatial objects equally (or no mass scalar at all).


b) An individual scalar value (e.g., pounds, kilograms) directly associated with each individual object. This approach obviously doesn't scale well.


c) Defined by a base "type" (e.g., wood, rock, water, flesh, weightless...) with a scalar value associated with the type. That value could be used on its own or it could be used in conjunction with the size of the object to determine the final scalar, depending on the accuracy required.

Not sure about the Frostbite engine but I would assume it uses something similar to c).

share|improve this answer
the (C) part looks promising, but for that, one have to tightly integrate renderer with physics engine... – user73830 Jan 3 '13 at 10:12
For completeness there is D) Not modeled at all. Games, even games with physics, don't have to have massive objects. If all you are modelling is gravity on Earth, everything falls at a constant rate anyway, so you don't need to model Mass. Although, it occurs to me that this might fall under A. Maybe clarify A if that's the case? – DampeS8N Jan 3 '13 at 13:26
A good point that I meant to include under a); edited the answer. – Djentleman Jan 3 '13 at 13:44

Physically, mass is not directly related to volume. OK, technically mass is related to volume, but based on another property: density. My point is that you could only apply a volume-based mass if the object has a specific density. Which is ultimately little more than just selecting the mass by selecting a density. Though if you have breakable things, having a density is useful as it allows you to compute the mass of the broken object(s).

In general, the masses of objects that are physically modeled are usually chosen in a videogame based on the actual results of the physics simulation, not realistic physical properties. Game developers pick what looks good and behaves well, not what is necessarily "correct" in any real-world context.

share|improve this answer

there is probably diffrent ways to solve this, and depending on how important that is for your game, you could end up adding a scalar value to each entity saying it´s specifik mass that gets calulated at loading time.

Another aproach is what Djentleman said, to define stuff like wood, rock, metal and water and from there define the mass.

I dont think any one here knows the frostbite engine well enugh to say how they handle it, and if they are, they are probably not allowed to tell you how it´s working.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.