Physics behavior

For questions about using Classic.

Post » 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? :P

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

Post » 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
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » 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

Post » Thu Jun 04, 2009 6:08 pm

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

Post » Fri Jun 05, 2009 8:44 am

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


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests