VrControllerArmModel constructor

VrControllerArmModel({
  1. VrControllerHandedness handedness = VrControllerHandedness.right,
  2. Vector3? restOffset,
  3. double horizontalReach = 0.12,
  4. double verticalReach = 0.10,
  5. double depthReach = 0.08,
  6. double responsiveness = 18,
})

Implementation

VrControllerArmModel({
  this.handedness = VrControllerHandedness.right,
  Vector3? restOffset,
  this.horizontalReach = 0.12,
  this.verticalReach = 0.10,
  this.depthReach = 0.08,
  this.responsiveness = 18,
}) : restOffset =
         restOffset?.clone() ??
         Vector3(
           handedness == VrControllerHandedness.left ? -0.25 : 0.25,
           -0.24,
           0.55,
         ) {
  _requireNonNegative(horizontalReach, 'horizontalReach');
  _requireNonNegative(verticalReach, 'verticalReach');
  _requireNonNegative(depthReach, 'depthReach');
  if (!responsiveness.isFinite || responsiveness <= 0) {
    throw ArgumentError.value(
      responsiveness,
      'responsiveness',
      'Must be finite and positive.',
    );
  }
}