# Physics behavior

### » Thu Jun 04, 2009 3:54 am

The size (or at least scale) of a sprite seems to have a direct effect on how much of an effect a given Force has.

Does anyone know the formula being used to calculate acceleration based on force and how it interacts with sprites? (Specifically Linear dampening, Apply Force towards point, and mass).

Is it mass-per-pixel by chance?

Other note; I'm using Ellipse collision mask.
*edit* one more question.
How is the ellipse generated? is it circumscribed within the bounding box of the sprite?
B
2
G
3
Posts: 43
Reputation: 936

### » Thu Jun 04, 2009 2:13 pm

IIRC (David should be able to confirm) the mass of an object is proportional to its size. Therefore bigger objects require more force. If you're using a custom collision mask, it depends on the area inside the polygon.

I'm not sure this is the best way to do it, actually. It doesn't seem to make sense saying "Mass = 1" then having that change if you stretch the object...

And yes, if you use an ellipse, it'll have the same with/height as the bounding box.
Scirra Founder
B
362
S
216
G
75
Posts: 23,064
Reputation: 180,315

### » Thu Jun 04, 2009 3:19 pm

Yes, the mass is proportionate to the area of the collision box used (so the size of the ellipse, the mass of the area of all the polygons if it's a custom mask).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

### » Thu Jun 04, 2009 6:08 pm

So then actual mass is Collision Mass Area * Mass ?
B
2
G
3
Posts: 43
Reputation: 936

### » Fri Jun 05, 2009 8:44 am

Yes.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529