Virtual Controls not working on android

hasnainfareed

New member
Hi there, in the Unity editor, controls are working fine, like when I force input the virtual controls and move the joystick with mouse on pc, character works fine,but after
I build the game,test it in my android, even though joystick is moving but character does not move, neither the touch pad to look around works, please help.
 
Do the virtual controls move visually? I would debug this by logging out the horizontal and forward movement values within CharacterLocomotion.Move to see if it's getting the correct value.
 
Thanks for the concern legend, Yes Virtual Controls do move visually but I can not understand what the problem is, in the update I used CharacterLocomotion.Move(forward parameters)
and then strange thing is happening, in unity editor, if I don't move with joystick, character just shows the move animation without moving(then if I use the joystick to move, instead of walk, it runs), but after I build the game, on android the character not just shows the the run animation but moves forward without joystick(still not responding to the joystick).
 
Thanks God, its Solved, turned out in camera Controller Script We have to reference the player, though it gets that reference on runtime,but in that case it doesn't work in android build.
 
Top