BodySettings3D constructor
BodySettings3D({
- Vector3? position,
- Quaternion? rotation,
- Vector3? linearVelocity,
- Vector3? angularVelocity,
- BodyType3D type = BodyType3D.dynamic,
- MotionQuality3D motionQuality = MotionQuality3D.discrete,
- int layer = 0,
- bool isSensor = false,
- bool allowSleeping = true,
- bool lockRotation = false,
- double friction = 0.5,
- double restitution = 0.0,
- double linearDamping = 0.05,
- double angularDamping = 0.05,
- double gravityFactor = 1.0,
- double mass = 0.0,
- int userData = 0,
A body with the given settings; the defaults are a dynamic body on layer 0 that may sleep.
Implementation
BodySettings3D({
Vector3? position,
Quaternion? rotation,
Vector3? linearVelocity,
Vector3? angularVelocity,
this.type = BodyType3D.dynamic,
this.motionQuality = MotionQuality3D.discrete,
this.layer = 0,
this.isSensor = false,
this.allowSleeping = true,
this.lockRotation = false,
this.friction = 0.5,
this.restitution = 0.0,
this.linearDamping = 0.05,
this.angularDamping = 0.05,
this.gravityFactor = 1.0,
this.mass = 0.0,
this.userData = 0,
}) : position = position ?? Vector3.zero(),
rotation = rotation ?? Quaternion.identity(),
linearVelocity = linearVelocity ?? Vector3.zero(),
angularVelocity = angularVelocity ?? Vector3.zero();