private Quaternion center | Middle of the allowed rotation range. |
private Pickup handlePickup | The pickup players grab to move the lever. |
private bool isActive | True while the lever is in its active angle range. |
private float maxActiveAngle | Upper angle of the active range. |
private float maxAngle | Upper limit of the rotation. |
private float maxRange | Half the rotation range, worked out in Awake. |
private float minActiveAngle | Lower angle of the active range. |
private float minAngle | Lower limit of the rotation. |
private float minInactiveAngle | Once active, the angle must fall below this before it counts as off again. |
private Vector3 neutralPosition | Local direction that counts as zero rotation. |
private Transform pivot | Transform the grip point is measured from. |
private float returnSpeed | How fast it swings back to rest when let go. Zero leaves it where it is. |
private Vector3 rotationAxis | Local axis the lever turns around. |
private Transform target | Transform that is rotated. |
private float targetRotation | Starting angle of target. |
private UnityEvent turnedOff | Event raised when the lever leaves the active range. |
private UnityEvent turnedOn | Event raised when the lever enters the active range. |
private IUnityUpdateMethod updatePosition | Per-frame update registration. |