This content has been marked as final.
Show 1 reply
-
1. Re: Gravity and Collision in CS4
kglad Sep 14, 2009 3:57 PM (in response to Me2LoveIt2)an object's x,y properties reference its registration point. if you want to determine the edge nearest the colliding object, use the appropriate factor.
in the simple situation you have, you're looking at the reg point + ball.height/2 because your reg point is probably in the center of the ball. in more complex situations (like two balls colliding from any direction) you would use trig to determine the points on each ball where the collision occurs.
add each object you want to evaluate in your enterframe loop to an array and loop through that array on each enterframe loop.


