removeFromWorld method

void removeFromWorld(
  1. World world
)

Remove the vehicle including its finalraints from the world.

Implementation

void removeFromWorld(World world){
  //final finalraints = this.finalraints;
  world.removeBody(chassisBody);
  world.removeEventListener('preStep', preStepCallback);
  this.world = null;
}