AWPBvhTriangleMeshShape and Collision Callback

Software: Away3D 4.x

Alex Bogartz, Sr. Member
Posted: 07 February 2012 12:39 AM   Total Posts: 216

I saw that there were some issues regarding this, so here’s what I’m seeing.

I’m loading a 3ds file which has a shape that I’m using for physics.  It’s creating all the physics correctly, meaning the objects bounce off this shape and the debug draw looks correct, but when I add a callback listener:

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

It never fires.

I have callbacks turned on using:

physicsWorld.collisionCallbackOn true

And this works correctly using regular shapes like cubes in another application.  It’s when I am making the shapes using AWPBvhTriangleMeshShape that it’s failing.

Is there a fix for this?

   

John Brookes, Moderator
Posted: 07 February 2012 01:02 AM   Total Posts: 732   [ # 1 ]

You might want to try updating the physics lib as it works for me, using the latest.
but I see you must be using an older version.

AWPCollisionEvent
is now
AWPEvent

   

Alex Bogartz, Sr. Member
Posted: 07 February 2012 01:04 AM   Total Posts: 216   [ # 2 ]

Thanks John, that did it!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X