setPosition method

void setPosition(
  1. Vector2 position
)

The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.

Implementation

void setPosition(Vector2 position) {
  this.position = position;
}