ExplosionDef

data class ExplosionDef(val position: Vec2 = Vec2.Zero, val radius: Float = 1.0f, val falloff: Float = 1.0f, val impulsePerLength: Float = 1.0f, val maskBits: ULong = B2_DEFAULT_MASK_BITS)

Definition for a radial explosion.

Parameters

position

The center of the explosion in world coordinates

radius

The maximum radius of the explosion

falloff

The falloff radius. Beyond this distance the impulse decreases linearly to zero at radius.

impulsePerLength

The impulse magnitude per unit length, usually in kg*m/s

maskBits

Collision mask bits to filter which shapes are affected

Constructors

Link copied to clipboard
constructor(position: Vec2 = Vec2.Zero, radius: Float = 1.0f, falloff: Float = 1.0f, impulsePerLength: Float = 1.0f, maskBits: ULong = B2_DEFAULT_MASK_BITS)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard