once I shoot and hit it, it swings forever and never stops.
what am I doing wrong?.. any input is greatly appreciated.
gravity: -30;
var boxShape : AWPBoxShape;
boxShape = new AWPBoxShape(hangingKey.maxX, hangingKey.maxY, hangingKey.maxZ);
var hangingKeyBody : AWPRigidBody;
var hinge : AWPHingeConstraint;
var wireframegrid : WireframeAxesGrid = new WireframeAxesGrid();
_view.scene.addChild(wireframegrid);
hangingKeyBody = new AWPRigidBody(boxShape, hangingKey, 100);
hangingKeyBody.position = new Vector3D(0, 0, 0);
hangingKeyBody.rotationX = hangingKey.rotationX;
hangingKeyBody.restitution = 1;
physicsWorld.addRigidBody(hangingKeyBody);
hinge = new AWPHingeConstraint(hangingKeyBody, new Vector3D(0, 100, 0), new Vector3D(1, 0, 0));
physicsWorld.addConstraint(hinge);
var ground : Mesh = new Mesh();
ground.geometry = new PlaneGeometry(50000, 50000);
ground.material = new ColorMaterial(0xFF0000);
ground.mouseEnabled = true;
ground.y -= 300;
ground.addEventListener(MouseEvent3D.MOUSE_UP, onMouseUp);
_view.scene.addChild(ground);