public override void OnRemovalFromSpace(Space oldSpace)
 {
     //Remove any supplements from the space too.
     oldSpace.Remove(Body);
     oldSpace.Remove(HorizontalMotionConstraint);
     oldSpace.Remove(VerticalMotionConstraint);
     //This character controller requires the standard implementation of Space.
     oldSpace.BoundingBoxUpdater.Finishing -= ExpandBoundingBox;
     SupportFinder.ClearSupportData();
     Body.AngularVelocity = new Vector3();
     Body.LinearVelocity  = new Vector3();
 }
示例#2
0
 /// <summary>
 /// Sets up the vehicle's information when being added to the space.
 /// Called automatically when the space adds the vehicle.
 /// </summary>
 public override void OnRemovalFromSpace(Space oldSpace)
 {
     foreach (Wheel wheel in Wheels)
     {
         wheel.OnRemovalFromSpace(oldSpace);
     }
     oldSpace.Remove(Body);
 }
示例#3
0
 /// <summary>
 /// Removes the motors from the solver.  Called automatically.
 /// </summary>
 public override void OnRemovalFromSpace(Space oldSpace)
 {
     oldSpace.Remove(AngularMotor);
 }
示例#4
0
 internal void OnRemovalFromSpace(Space space)
 {
     space.Remove(detector);
     detector.CollisionInformation.CollisionRules.Specific.Remove(wheel.vehicle.Body.CollisionInformation.collisionRules);
 }