TouchSticks
The following TouchStick Actions have been included in the Asset.
Action Name
Description
Set Static Touchstick
Adds the Static Touchstick and allows for single tap Action
Set Dynamic Touchstick
Adds the Dynamic Touchstick
Hide TouchStick
Hides either the Static or Dynamic Touchstick
Resize TouchStick
Resizes either the Static or Dynamic Touchstick
Set Static Camera Touchstick
Adds the Static Camera Touchstick and allows for single tap Action
Hide Static Camera TouchStick
Hides the Static Camera Touchstick
Set Dynamic Camera Touchstick
Sets the sensitivity needed for Camera Touchsticks
Hide Dynamic Camera Touchstick
Hides the Dynamic Camera Touchstick
Set Follow Camera Touchstick
Adds the Follow Camera Touchstick with orbit speed parameter
Hide Follow Camera Touchstick
Hides the Follow Camera Touchstick
Set Steering Wheel
Adds the Steering Wheel Touchstick with orbit speed parameter
Set Pedals
Adds the Pedals Touchstick for use with Steering Wheel
Hide Steering Wheel
Hides/Shows the Steering Wheel
Hide Pedals
Hides/Shows the Pedals
Set Auto Run
Auto runs the Player either forward of sideways
To use the TouchStick Actions, you require the included Prefabs, as these include script components needed. The following Prefabs must be placed in the Touchstick slot within the GC Preferences Panel, other Prefabs are added to the Action.
TouchStick Dynamic - for player control, appears under the touch point.
TouchStick Gyro - used when the Player Movement is controlled by the Gyroscope.
TouchStick Static - Player movement and fixed position touchstick.
It is also suggested that you select Touchstick Mode : Discreet in the Preferences Panel. Otherwise the Player character will slide upon movement and the Animations will not Match.
The Static TouchStick needs to be added to the GC Preferences Panel, and the Set Static TouchStick Action called on start. This Action allows you to set the position and offset the position, as well as resize the Touchstick area. A single Tap on the Touchstick can also execute an Action list if set.
2. The Static Camera TouchStick allows for your game to have Dual Touchsticks and not use the drag camera on the screen. The Prefab is added to the Action and NOT the GC Preferences. The other parameters are set up the same. However, it is advisable to also set the Camera sensitivity (Adventure or First Person) to the maximum of 100 as the drag area is reduced to the touchstick and it will be unresponsive otherwise.
3. The Dynamic TouchStick and Dynamic Camera are configured in the same way. These Touchsticks will appear under the touch point on the left or right respectively, however they do not include a single Tap Action.
4. The Follow Camera Touchstick is designed to be used with the follow Camera Motor. It would usually be used in conjunction with a Static Touchstick, but can be used with Dynamic or even Gyro. The Follow Camera Touchstick Action will position the touchstick and set the Orbit speed of the Follow Camera around the Player. This touchstick does not allow for a single Tap Action.
5. The Steering Wheel and Pedals Touchsticks are design to be used together. They would normally be used for controlling a Vehicle using xAxis and yAxis (see Extras for code examples). The Set Actions for the Steering Wheel also allow for the Wheel angle and the return speed to be set, as well as the size and position.
When using the Hide Actions for each of the above Touchstick, the Show should be used to show the Touchstick. If you execute the Setup Action again, yopu will may two instances of the Prefab.
For more information on TouchStick Actions, see Example 4 - Controls, and for details on the use of the Steering Wheel and Pedal Touchsticks, see Example 5 - Steering Wheel.
6. The Set Auto Run Action is used in conjunction with the TouchStick None. The Player will run either forward or sideways as long as this is activated. To stop the player, simply call the Action again and uncheck Activate. To walk the player or adjust the speed, see the Player Character setup.
For more information on AutoRun, see Example 9 - AutoRun.
Last updated