addToWorld method

void addToWorld(
  1. World world
)

Add the vehicle including its constraints to the world.

Implementation

void addToWorld(World world) {
  for (final key in particleBodies.keys) {
    world.addBody(particleBodies[key]!);
  }
  for (int i = 0; i < constraints.length; i++) {
    world.addConstraint(constraints[i]);
  }
  //world.addEventListener('preStep', _update);
}