Hi. Hopefully this is the right place to post this. First off great job with the physics, wonderfully simple, beautifully integrated, enormous fun, and just what the series needed.
However, as a human my first instinct is to smash stuff together (i.e. if two objects of the same type hit with enough momentum, they'll take damage and eventually break) and I'm trying to figure out the best way to do this. There doesn't seem to be a built-in method for determining force of impact.
I can't use speed because two objects moving in the same direction very quickly may glance off each other but not have enough relative speed that they should do damage. Now...
If I was using two different object types I could approximate their mass by using the x and y edge coordinates to approximate area and multiplying by density. I could then calculate the x and y components of the velocity to determine the difference in speed for each component and thus the relative impact speed, which I could then, using the approximate mass, turn into a momentum or 1/2mv^2 energy transfer to each, determining how much damage should be applied to each object. My question is:
1. The engine must already do this - so is there an easier way?
2. Is there a more precise way to determine mass, other than counting pixels for each object?
3. If I do need to take this approach, how do I get it to work for two objects of the same type/group? How do I ensure I'm looking at one of their velocities/masses, then the other's, then both added together, all in the same collision statement? Can 'for each' do this, and if so how does it work? (I've had limited luck so far).
If you're taking requests a 'compare force on object to a value' statement would be INCREDIBLY useful.
Many thanks,
James