• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Box2d fixture area

J

Julien Matthey

Guest
QUESTION 1

Is there a way to get a fixture's area inside the object step event ?

Under the hood, I know box2d is computing a mass for every instance based on it's area and density so I wonder why there is no simple way for me to get said area ???

Because of this I tried dividing the instance mass (phy_mass) by it's density but I get the same problem for density. The only method available is physics_get_density(fixture_id) but then how do I get the current instance fixture id ????

QUESTION 2

I am simulating a body of water and for this I need to know when an object is overlapping with said body of water (defined as a sensor). Is there a way to have continuous collision events for as long as bodies overlap without them reacting to each other (not just begin overlap and end overlap as sensor objects give).

Thanks for any help.
 
Top