[SOLVED] Rigidbody Collision Detection

Software: Other

ScottL, Newbie
Posted: 18 December 2013 11:22 AM   Total Posts: 7

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_ADDEDcrashThis);

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?

   

ScottL, Newbie
Posted: 19 December 2013 02:23 AM   Total Posts: 7   [ # 1 ]

Nevermind guys, I figured it out.

Somehow a NaN value was being passed to the vectors, messing everything up.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X