isOnFloor

fun isOnFloor(particle: Particle): Boolean(source)

Returns true if particle stood on a floor at any time during the last step.

Samples

val pad = SolidTags.of(2)
val world = PhysicsWorld()
val grid = SolidGrid(columns = 10, rows = 10, tileSize = 16f)
grid.fill(column = 3, row = 9, tags = pad)
world.solids = grid
val drop = world.particles.add(x = 56f, y = 100f)
repeat(60) { world.step(1.seconds / 60) }
assertPrints(world.events.isOnFloor(drop), "true")
assertPrints(world.events.floorTagsOf(drop).intersects(pad), "true")