# Collision force - Physics Question

• 12th December 2013, 12:36 AM
Slimjimmyb
Collision force - Physics Question
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
• 12th December 2013, 01:57 AM
happygreenfrog
Hey, first off, welcome to the forums! Second off, I don't know if there is a way to do this yet without using the speed. However, Clickteam is taking requests, but they use the bug tracker to keep track of feature requests as well as the forums. There is a feature requests section for most of their products on it, and that is where you should put feature requests, since they are more likely to notice them there. By the way, here is a link to the bug tracker: http://bugbox.clickteam.com/