I am trying to simulate gravity on an object, and there are many helpful tutorials on this site but I am at a loss as to how to handle collisions with stationary platforms.
Lets say you have a block and it is falling, when it hits the platform it will stop - good
However When its hits the edge of the platform (and greater than 50% is over the edge) it should spin out and keep falling. This is not the case if you do it the way I currently am with a simple i++ gravity
ME.y += 2;
and a simple hittest
if (ME.hitTestObject(MovieClip(walls))){
ME.y -= 2;
}
So my question is - how does one make more acurate gravity collisions?