Home

Awesome

Unity3D-Simple-Mobile-Joystick

Mobile Joystick suitable for any types of game

Overview

Joystick controller for touchscreen device in unity 3d.

Similar arributes as unity native Input axis.

Demo

<table style="width:100%"> <tr> <th><img src="Images/Forward.gif" width=400></th> <th><img src="Images/Backward.gif" width=400></th> </tr> <tr> <td>Moving Character Forward</td> <td>Moving Character Backward</td> </tr> </table> <table style="width:100%"> <tr> <th><img src="Images/Left.gif" width=400></th> <th><img src="Images/Right.gif" width=400></th> </tr> <tr> <td>Moving Character Left</td> <td>Moving Character Right</td> </tr> </table> <table style="width:100%"> <tr> <th><img src="Images/Rotation.gif" width=400></th> <th><img src="Images/Rotation_r.gif" width=400></th> </tr> <tr> <td>Rotating Character Left</td> <td>Rotating Character Right</td> </tr> </table>

Usages

Parameter

<table style="width:100%"> <tr> <th>Name</th> <th>Description</th> </tr> <tr> <td><h4>Horizontal</h4></td> <td><p>Stores values of horizontal movement of the stick.</p> <p>left: -1</p> <p>center: 0</p> <p>right: +1</p> </td> </tr> <tr> <td><h4>Vertical</h4></td> <td><p>Stores values of vertical movement of the stick.</p> <p>Up: -1</p> <p>center: 0</p> <p>down: +1</p> </td> </tr> </table>

Methods

<table style="width:100%"> <tr> <th>Name</th> <th>Description</th> </tr> <tr> <td>public Vector2 <h4>Coordinate</h4></td> <td><p><h4>Returns</h4> Vector2 with </p> <p>x axis: Horizontal</p> <p>y axis: Vertical</p> </td> </tr> </table>