Add this component to a UI rectangle and it'll act as a detection zone for a joystick. Note that this component extends the MMTouchJoystick class so you don't need to add another joystick to it. It's both the detection zone and the stick itself.
More...
|
override void | Start () |
| On Start, we instantiate our joystick's image if there's one More...
|
|
virtual void | Awake () |
| On Start, we get our working canvas, and we set our neutral position More...
|
|
virtual void | Update () |
| On Update we check for an orientation change if needed, and send our input values. More...
|
|
virtual void | RotateIndicator () |
|
virtual float | EvaluateInputValue (float vectorPosition) |
| We compute the axis value from the interval between neutral position, current stick position (vectorPosition) and max range More...
|
|
virtual void | OnEnable () |
|
Add this component to a UI rectangle and it'll act as a detection zone for a joystick. Note that this component extends the MMTouchJoystick class so you don't need to add another joystick to it. It's both the detection zone and the stick itself.
◆ OnEndDrag()
override void MoreMountains.Tools.MMTouchDynamicJoystick.OnEndDrag |
( |
PointerEventData |
eventData | ) |
|
|
virtual |
◆ OnPointerDown()
virtual void MoreMountains.Tools.MMTouchDynamicJoystick.OnPointerDown |
( |
PointerEventData |
data | ) |
|
|
virtual |
When the zone is pressed, we move our joystick accordingly
- Parameters
-
◆ Start()
override void MoreMountains.Tools.MMTouchDynamicJoystick.Start |
( |
| ) |
|
|
protectedvirtual |
◆ _initialPosition
Vector3 MoreMountains.Tools.MMTouchDynamicJoystick._initialPosition |
|
protected |
◆ _knobCanvasGroup
CanvasGroup MoreMountains.Tools.MMTouchDynamicJoystick._knobCanvasGroup |
|
protected |
◆ _newPosition
Vector3 MoreMountains.Tools.MMTouchDynamicJoystick._newPosition |
|
protected |
◆ JoystickKnobImage
Sprite MoreMountains.Tools.MMTouchDynamicJoystick.JoystickKnobImage |
the image to use for your joystick's knob
◆ RestorePosition
bool MoreMountains.Tools.MMTouchDynamicJoystick.RestorePosition = true |
if this is set to true, the joystick's touch zone will revert to its initial position whenever the player drops the joystick. If not, it'll stay where it was.
The documentation for this class was generated from the following file: