Article Directory
mind Mapping
Specific steps
1. Creation of "floating point action"
"Right handle trigger key press" needs to use "Input.UnityInputManager.1DAxisAction" preset body to become FloatAction, the way is to copy the name of the left handle trigger key axis to the AxisName property of 1DAxisAction
2. Creation of "Boolean Action"
The hidden display of the newly created capsule Capsule:
when BoolAction is activated, gameObject.SetActive(false) hides the capsule;
when BoolAction is deactivated, gameObject.SetActive(true) displays the capsule
3. Use "FloatToBoolean.cs" to connect the two actions
FloatAction, when the value changes, calls DoTransform() of FloatToBoolean, as shown in Figure 1.
FloatToBoolean then lets BoolAction "receive" the converted Bool value, as shown in Figure 2.
Notice
Positive Bounds "positive value boundary": we can adjust it to 0.8~1, that is, when the trigger button is pressed to the end, the converted Bool value is true