title: BulletPhysics - Door object spins uncontrollably when placed on ground
body: <p>I am trying to simulate a door in BulletPhysics using a HingeConstraint. The following code works as intended, in that the cube pivots on its corner around the Y-axis, effectively swinging open like a door, but as soon as I place the object on the ground it begins flying around uncontrollably.</p>
  
  <pre><code>RigidBody body = physics.LocalCreateRigidBody(mass, Matrix4.CreateTranslation(new Vector3(0, 0.5f, 0)), new BoxShape(1, 1, 1));
  body.UserObject = "Door";
  
  Vector3 pivotInA = new Vector3(1, 1, 1);
  Vector3 axisInA = new Vector3(0, 1, 0);
  var hinge = new HingeConstraint(body, pivotInA, axisInA);
  
  const float targetVelocity = 1.0f;
  const float maxMotorImpulse = 1.0f;
  hinge.EnableAngularMotor(true, targetVelocity, maxMotorImpulse);
  physics.World.AddConstraint(hinge);
  </code></pre>
  
  <p>Disabling collisions between the door and ground would solve the problem but I am struggling to achieve this also. The documentation says you can set a collision type and mask for a body but only the <code>World.AddRigidBody()</code> constructor appears
  to take such parameters and as far as I can tell my door is added to the world as a Hinge and the ground is added automagically when calling <code>LocalCreateRigidBody()</code>, shown below.</p>
  
  <pre><code>CollisionShape groundShape = new BoxShape(10, 1, 10);
  CollisionObject ground = LocalCreateRigidBody(0, Matrix4.CreateTranslation(0, -1, 0), groundShape);
  ground.UserObject = "Ground";
  </code></pre>
  
  <p>How can I stop the door spinning out when it sits atop the ground?</p>