- Home /
Mobile input problem for first-person shooter
Hi Unity Answers,
I'm making a 3D FPS for iOS and Android, and I'm having trouble with some of the mobile input. My character in the game has two instances of the MouseLook.cs script, one on the camera, and one on the model itself. I modified the script to work on both mobile devices (iOS/Android in this case) and PC/Mac versions. The code for PC/Mac works fine, but I'm having issues with the touch controls.
The control layout in the game (had to cut a little because of size)
Here's the basic flow of what I'm trying to do:
1. A boolean value checks if the player is moving
2. If the player is moving, have the first touch move the joystick and the second touch move the camera
3. If the player isn't moving, have the first touch move the camera while the second touch moves the joystick
4. The system should be able to change between which touch does what
I've been working on this all morning and haven't had any luck. Is there a fast and easy way to modify the MouseLook script based on the flow above? Any help would be much appreciated.
Your answer
Follow this Question
Related Questions
How to improve FPS on mobile? 1 Answer
Why is my camera rotating like crazy? 2 Answers
FPS of up-to-date action game on mobile devices? 60 vs 30 FPS? 0 Answers
Using Unity for a IOS Menu Only 0 Answers
Mobile device cellular provider 0 Answers