Hi,
I have two objects, I would like to move one object and when it touch the other it stop moving without entering in the other.
I’m using collision to detect and stop the movement but the object is entering in the other by the distance of the increasement. If I put a force it will push it away but I need to stop exactly touching the other.
BODY1.addEventListener(AWPEvent.COLLISION_ADDED, Collision);
function Collision(event:AWPEvent):void
{
dis=0;
removeEventListener(Event.ENTER_FRAME, GMove);
}