- Home /
 
Simple GUI for walkthrough on mobile phone
Hello everyone. Few years ago I made a simple walkthrough with several models, terrain with a few plants, capsule as FPS model. On capsule I hooked Main Camera and a few scripts (MouseLook.cs, FPSInputController, after that CharacterMotor and a CharacterController are automatically added). It works great in a web player but now I would like to port that to Android platform. On phone there is no mouse and keyboard, I need a simple GUI. I've been looking at docs, forum and questions but I have not found anything that help me. This is closest (http://forum.unity3d.com/threads/221934-Creating-a-GUI-Control-for-Mobile-Game). I would like controls for left, right, forward, and possibly for back and jump. Thanks for help.

Answer by petomavar · Jan 29, 2014 at 03:20 AM
None. Somebody could write me that in Standard Assets (Mobile) there is a bunch of good scripts from Penelope Complete Project (https://www.assetstore.unity3d.com/#/content/15). Import asset, see Control Setups with scenes, I used and modify FirstPersonSetup with attached scripts FirstPersonControl and Joystick. Don't forget to include code for quit with phone back button at the end of FirstPersonControl script.
         // Rotate the character around world-y using x-axis of joystick
         thisTransform.Rotate( 0, camRotation.x, 0, Space.World );
         
         // Rotate only the camera with y-axis input
         cameraPivot.Rotate( -camRotation.y, 0, 0 );
     }
     
     
     // back button for quit -new code
     
         if (Input.GetKeyDown(KeyCode.Escape))
     {
     Application.Quit();
     }
     
 }
 
               
 
Answer by viviana-borjas · Oct 14, 2016 at 08:35 PM
Could you help me, please? I just want to know how you did it because Unity 5 is now working with UI instead of GUI
I think some scripts had changed too :/
Your answer