SpringArmComponent constructor
SpringArmComponent({
- double targetLength = 4.0,
- double probeRadius = 0.2,
- Vector3? targetOffset,
- Vector3? socketOffset,
- bool enablePositionLag = false,
- double positionLagSpeed = 10.0,
- double minLength = 0.5,
- int layerMask = 0xFFFFFFFF,
- Node? cameraNode,
- bool inheritYaw = true,
- bool inheritPitch = true,
- double yaw = 0.0,
- 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();