RESOLVED: How to create Trigger Callback that doesn’t affect the physical world

Software: Away3D 4.x

eigenface, Newbie
Posted: 15 November 2013 12:38 AM   Total Posts: 1   [ # 16 ]

Sorry to necropost, but this issue is not in fact resolved.  Judging from this thread, and from my own exhaustive efforts, there is no way to create a sensor that detects an AWPKinematicCharacterController without blocking it.

Creating one like so:

var charShape:AWPCapsuleShape = new AWPCapsuleShape(10, 50);
charObject.collisionFlags = AWPCollisionFlags.CF_CHARACTER_OBJECT;

charController = new AWPKinematicCharacterController(charObject, 0.1);

and adding a collision handler like so:

physicsWorld.collisionCallbackOn = true;
charObject.addEventListener(AWPEvent.COLLISION_ADDED, charCollisionAddedHandler, false, 0, true);

and a sensor like so:

var sensorShape:AWPBoxShape = new AWPBoxShape(100, 50, 100);
var sensor:AWPRigidBody = new AWPRigidBody(sensorShape);
sensor.collisionFlags = AWPCollisionFlags.CF_NO_CONTACT_RESPONSE;

I can see the sensor and my controller’s capsule using AWPDebugDraw, and when I run into the sensor, charCollisionAddedHandler fires as I expect.  However, the sensor stops me from passing through just like a solid object, despite it’s collisionFlags.

When I spawn other dynamic objects in the scene, they pass through the sensor as I’d expect.  Only my capsule is blocked by the sensor.  I’ve tried using an AWPCollisionObject and an AWPGhostObject as a sensor instead of a an AWPRigidBody, and the results are the same.

Looking at the C++ bullet engine forums, I found a similar problem with btKinematicCharacterController, with earlier versions of bullet.  What version of bullet does awayphysics use?  Perhaps the most recent version of bullet (2.82 as of now) fixes this bug, and awayphysics would benefit from recompiling bullet.

FYI according to, 2.82 is likely to be the last version before bullet 3 is released, and bullet 3 runs on the GPU and therefore will not be usable by awayphysics.


John Brookes, Moderator
Posted: 15 November 2013 12:31 PM   Total Posts: 732   [ # 17 ]

Yeah AwayPhysics need updating. Was an issue with bullet and should now be fixed.



Away3D Forum

Member Login