###

» Tue Apr 04, 2017 2:08 pm

Dude, that is still heavy stuff for me to find some logic in. I see people play with this as kids with Pacman. So it is time for me to bring things under my words. This an attempt for me to understand, sorry if i am wrong. Here goes nothing.

Physics behavior has an expression 'Mass'.

But, that value needs interpretation, depending on how you gonna use it.

50 pixels = 1 meter, therefor we have a conversion factor of 50 between pixels and meters. The engine is using meters internal, just like the real world.

Mass = Volume * Density.

Volume is in cubic meters. But the shapes in construct are 2D.

So we rather have something like 2DMass : 2Darea * Density, according the manual.

But in really the expression mass returns a value Mass : Area * Density * the usually conversion factor.

Or Mass : Area * Density * 50.

That is a factor 50 off. (area = pixel^2 or 50 * 50) But that does not really matter, because if we would use mass in a calculation, this calculation must end up in pixel units. So we will again use the same conversion factor, so twice, or 50 * 50.

So,

if you want the mass returned by the expression in Box2d units (meters) you divide by 50 (the conversion factor)

If you want the mass returned by the expression in pixel units you multiply by 50 (the conversion factor)

Now lets swipe to Newton.

F = m * a.

Force (kg*meter*sec^2)= Mass * Acceleration.

But we usually need kg*pixel*sec^2 to work with pixels.

To work with pixels, we do the regular conversion. If mass = the value (with no unit assigned) in the expression

F = (m * a) * 50

To have it in the units used by the engine (kg*meter*sec^2) the regular conversion from pixels to meters

F = (m * a) / 50