Hi all,
Am currently adding a mesh to the AWPRigidBody and then adding this to the Rigid world, as per standard with a mouse listener on the mesh.
mesh.addEventListener(MouseEvent3D.CLICK, tipDomino);
And then in the resulting listener func does the deeds. Is there anyway of directly accessing the rigidbody in the physics from the mesh without traversing the entire world ?
for each (var body:AWPRigidBody in physicsWorld.nonStaticRigidBodies) {
if (body.skin == Mesh(event.target)) body.applyCentralImpulse(impulse)
}
See it here
http://digitinteractive.com.au/domino/
controls.
wasd, mouse down to look, click dominos, fire with space bar, enter to reset.