BasicKinematicBody constructor

BasicKinematicBody({
  1. BodyType type = BodyType.kinematic,
  2. double? mass,
  3. Matrix3? inertiaTensor,
  4. Vector3? linearVelocity,
  5. Vector3? angularVelocity,
  6. double linearDamping = 0,
  7. double angularDamping = 0,
  8. bool useGravity = false,
  9. bool ccdEnabled = false,
  10. Vector3? linearAxisLocks,
  11. Vector3? angularAxisLocks,
})

Implementation

BasicKinematicBody({
  BodyType type = BodyType.kinematic,
  double? mass,
  Matrix3? inertiaTensor,
  Vector3? linearVelocity,
  Vector3? angularVelocity,
  double linearDamping = 0,
  double angularDamping = 0,
  bool useGravity = false,
  bool ccdEnabled = false,
  Vector3? linearAxisLocks,
  Vector3? angularAxisLocks,
}) : _type = _checkType(type),
     _mass = mass,
     _inertiaTensor = inertiaTensor,
     _linearVelocity = linearVelocity ?? Vector3.zero(),
     _angularVelocity = angularVelocity ?? Vector3.zero(),
     _linearDamping = linearDamping,
     _angularDamping = angularDamping,
     _useGravity = useGravity,
     _ccdEnabled = ccdEnabled,
     _linearAxisLocks = linearAxisLocks ?? Vector3(1, 1, 1),
     _angularAxisLocks = angularAxisLocks ?? Vector3(1, 1, 1);