snap method

void snap(
  1. Vec2 newPos
)

Implementation

void snap(Vec2 newPos) {
  pos.setFrom(newPos);
  velocity.set(0, 0);
}