Hey guys,
I’m having an issue with the event listener for a rigid body.
The usual suspects have been taken care of:
physicsWorld.collisionCallbackOn = true;
rigidBody.addEventListener(AWPEvent.COLLISION_ADDED, crashThis);
private function crashThis(e:AWPEvent):void {
trace("I dropped it like it's hot.");
}
But it doesn’t work anytime I use rigidBody.applyCentralForce inside the physics step loop.
More specifically any time the forces applied using applyCentralForce get much above zero the collision callback stops working.
For example:
//This works! Collisions are called on this rigidBody
rigidBody.applyCentralForce(new Vector3D(0,0,0));
//When any one of the three vectors gets much above zero, collisions stop firing the event.
//The code below causes the event not to be called.
rigidBody.applyCentralForce(new Vector3D(1,0,0));
The collisions still work as normal in the physics, there’s just no event fired when they happen with the forces being applied.
Any ideas?