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(); }
/// <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); }
/// <summary> /// Removes the motors from the solver. Called automatically. /// </summary> public override void OnRemovalFromSpace(Space oldSpace) { oldSpace.Remove(AngularMotor); }
internal void OnRemovalFromSpace(Space space) { space.Remove(detector); detector.CollisionInformation.CollisionRules.Specific.Remove(wheel.vehicle.Body.CollisionInformation.collisionRules); }