moveTo
Moves particle to (x, y) and keeps its velocity.
Samples
val world = PhysicsWorld()
val p = world.particles.add(x = 0f, y = 0f)
// Teleports it, at rest: it does not fly off at the speed of the jump.
world.particles.moveTo(p, 500f, 0f)
world.step(1.seconds / 60)
assertTrue(world.particles.xOf(p) == 500f)Content copied to clipboard