Unity 5 Mobile Joysticks Tutorial - Touch Input 2D Spaceship Controller

  • 7 лет назад
In this Unity Touch Tutorial we create a touch joystick and button in Unity 5 and use it to control a floaty spaceship.\r
\r
Visit my website to download the project: \r
Twitter: \r
\r
Time Breakdown:\r
\r
1:07 - Importing CrossPlatformInput from the Standard Assets\r
2:23 - Adding the joystick to our scene and setting up all the other requirements\r
3:20 - Fixing the Joystick start position so it doesnt snap to the bottom corner of the screen\r
4:13 - Clamping our joystick movement to a circle rather than a square\r
6:45 - Setting up the player spaceship in Unity\r
8:25 - Starting the spaceship player controller script\r
9:53 - How to read the joystick data from the CrossPlatformInputManager\r
13:10 - Using a conditional operator to apply boost speed\r
14:45 - Adding linear drag to slow down like Asteroids\r
15:45 - Adding Canvas Scalar component so the GUI stays on screen\r
16:20 - Build and demonstration on Android