FallingShatterEffect
FallingShatterEffect configures an impact-triggered shatter pipeline.
Characteristics
- Produces
explodeOnFirstImpact = true. - Clamps shard rows and columns to at least
1. - Ensures
impulseMax >= impulseMin. - Defaults to
ShardColliderShape.Box.
Typical use
Modifier.physicsBody( id = "drop_button", effect = FallingShatterEffect( shardsRows = 5, shardsCols = 5, shardColliderShape = ShardColliderShape.Circle, impulseMin = 0.08f, impulseMax = 0.22f, ))Good tuning targets
- Increase
restitutionfor bouncier impact. - Increase
linearDampingandangularDampingfor faster calm-down. - Set
shardTtlMsfor automatic shard cleanup.