No dispatching collision event

Software: Other

louis87, Jr. Member
Posted: 03 November 2011 07:50 AM   Total Posts: 46

Hi everyone,

I’m trying to get an event when the car of “BvhTriangleMeshCarTest” collide with any other object.

For that, I add this lines to the end of function “onCarResourceComplete”:

carBody.addEventListener(AWPCollisionEvent.COLLISION_ADDED,
function(
e:AWPCollisionEvent):void
{
 trace
("COLLISION");
}); 

I don’t get any event at all. Can someone confirm that (to report as a Bug) or tell me what I’m doing wrong?

Thanks!!

   

Yang Li, Administrator
Posted: 03 November 2011 12:59 PM   Total Posts: 80   [ # 1 ]

you need add this code: physicsWorld.collisionCallbackOn = true;

   

louis87, Jr. Member
Posted: 03 November 2011 01:06 PM   Total Posts: 46   [ # 2 ]

XD I became crazy looking for the solution, thanks!!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X