Quite a while since a post, I've got an idea but not 100% on how to execute.
How would you calculate the total weight of objects resting on a specific object.
The only way I could think of would be.
look at an object that is overlapping/colliding multiply its density by its size (or have a set variable for the weight).
then loop looking for other items overlapping/colliding that have a location with a Y value > than the last object looked at.
if this value exceeds a certain amount then destroy the original object.
The only issue; I cant see this being massively reliable as the object could then be colliding with two objects (if it was resting on both then i could divide that value by 2, but there would be no way to tell if it is resting the other object with as much force as it is the first)
anyone think of a simpler/more reliable way to do this?
-Id be a nice addition to my release this weekend but not a requirement
Apologies for wall of text
facebook.com/CritterPopGame