BodyDef constructor
BodyDef({
- BodyType type = BodyType.static,
- Object? userData,
- Vector2? position,
- double angle = 0.0,
- Vector2? linearVelocity,
- double angularVelocity = 0.0,
- double linearDamping = 0.0,
- double angularDamping = 0.0,
- bool allowSleep = true,
- bool isAwake = true,
- bool fixedRotation = false,
- bool bullet = false,
- bool active = true,
- Vector2? gravityOverride,
- Vector2? gravityScale,
Implementation
BodyDef({
this.type = BodyType.static,
this.userData,
Vector2? position,
this.angle = 0.0,
Vector2? linearVelocity,
this.angularVelocity = 0.0,
this.linearDamping = 0.0,
this.angularDamping = 0.0,
this.allowSleep = true,
this.isAwake = true,
this.fixedRotation = false,
this.bullet = false,
this.active = true,
this.gravityOverride,
this.gravityScale,
}) : position = position ?? Vector2.zero(),
linearVelocity = linearVelocity ?? Vector2.zero();