Mobile controller stuck

leeheo72

New member
Hello, I'm trying to implement mobile controls in my game. All the buttons such as Attack, Jump, reload, action, and switch work; however, Touchpad and joystick aren't working. (not responding) Any thoughts? (Using third-person controller)
I've tested the demo project in mobile, and it has the same issue. All the buttons are working except Touchpad and joystick.
 
Last edited:
Are you using the built in virtual controls? If the joystick doesn't move it sound like the unity event handler isn't active. If the joystick moves but the character doesn't then the joystick is likely mapped to the wrong name.
 
Thank you for your reply. Yes, I'm using the built-in virtual controls, and the joystick isn't moving. How can I activate the unity event handler?
 
You will want to make sure you have Unity's EventSystem component added. It could also be a transparent UI element that is getting in the way of the joystick. Your best bet is to create a new project and a new scene just to test out the basics. If you add the virtual controls to a freshly created character in the scene then it should work. Do not add it to the included demo scene as that is not setup for virtual controls.
 
Hello, Thank you for the fast response. I wanted to add the virtual controller to the ongoing project, and it's not been easy. When the event system component is not present, both the joystick and the buttons don't work. However, when I add the event system, the buttons work but not the joystick. Would you please explain what's preventing virtual controller functions in the demo scene? I think my project has the same issue.
 
The demo scene specifically prevents it as it's not meant for touch. But have you tried a new project just to verify the workflow? My guess is that there is something like a transparent UI element getting in the way if it's a problem with an existing scene.
 
Hello, I am still stuck with the same issue. It is the same symptom that's happening in the demo scene. When I add virtual controls, buttons work but not the joystick. Is there a way to resolve this issue? Solutions I've tried:
1. Checked to see transparent UI elements were getting in the way
2. Creating a new project - This worked, but I hope to get virtual joysticks to function in my current project.
What is preventing demo scene virtual controls from not working? I believe this might solve the issue.
 
I do not think the demo scene is related to yours as there is a lot of code which controls the setup.

Since a new scene works have you brought that scene over to your current project? This will indicate if the input manager bindings are setup.

From there if it does work you could bring in the working scene character to your existing scene to see if it's the character. If that works then it's your character so I would start looking at the Unity Input settings. If it doesn't work then it's related to your UI.
 
Top