SpringArmComponent constructor

SpringArmComponent({
  1. double targetLength = 4.0,
  2. double probeRadius = 0.2,
  3. Vector3? targetOffset,
  4. Vector3? socketOffset,
  5. bool enablePositionLag = false,
  6. double positionLagSpeed = 10.0,
  7. double minLength = 0.5,
  8. int layerMask = 0xFFFFFFFF,
  9. Node? cameraNode,
  10. bool inheritYaw = true,
  11. bool inheritPitch = true,
  12. double yaw = 0.0,
  13. double pitch = 0.0,
})

Implementation

SpringArmComponent({
  double targetLength = 4.0,
  this.probeRadius = 0.2,
  vm.Vector3? targetOffset,
  vm.Vector3? socketOffset,
  this.enablePositionLag = false,
  this.positionLagSpeed = 10.0,
  this.minLength = 0.5,
  this.layerMask = 0xFFFFFFFF,
  this.cameraNode,
  this.inheritYaw = true,
  this.inheritPitch = true,
  this.yaw = 0.0,
  this.pitch = 0.0,
}) : targetLength = math.max(minLength, targetLength),
     currentLength = math.max(minLength, targetLength),
     targetOffset = targetOffset?.clone() ?? vm.Vector3(0, 1.5, 0),
     socketOffset = socketOffset?.clone() ?? vm.Vector3.zero();