Virtual Controls

For more robust virtual controls we recommend an input asset dedicated to mobile input such as Control Freak or Easy Touch which the Ultimate Character Controller is integrated with. A basic set of virtual controls are included though which allow for virtual buttons, virtual joysticks, or virtual touchpads. The built-in virtual controls will automatically be enabled on a mobile platform. They can also be force enabled within the Unity Input component.

All virtual controls must be a child of the Virtual Controls Manager component. This allows the virtual controls to associate themselves with the correct character.

Setup

  1. Open the Setup Manager.
  2. Click on the “Add UI” button. This will add the Demo/Prefabs/UI/VirtualControls prefab as a child of the Canvas GameObject.
Virtual Button

The virtual button allows for a virtual control that the player can press.

Button Name

The name of the button input.

Virtual Joystick

The virtual joystick represents a joystick that stays within the specified radius range. When the press is released the joystick know will snap back to the starting position.

Horizontal Input Name

The name of the horizontal input axis.

Vertical Input Name

The name of the vertical input axis.

Joystick

A reference to the joystick knob that moves with the press position.

Radius

The maximum number of pixels that the joystick can move.

Deadzone Radius

The joystick will return a zero value when the radius is within the specified deadzone radius of the center.

Virtual Touchpad

The virtual touchpad that will return an input axis position of the press relative to the starting press position.

Horizontal Input Name

The name of the horizontal input axis.

Vertical Input Name

The name of the vertical input axis.