I can move left and right without a problem but if I'm near a ladder I can't move up or down on it. It works fine if I'm using keyboard controls and moving up or down on the ladder but when I switch platforms to android the up and down touch buttons don't work while the keyboard buttons do still work when they shouldn't. I think I have to put
//#if UNITY_STANDALONE || UNITY_WEBPLAYER
to stop the keyboard buttons from working but I'm not sure where. This is where I put it in my jump animation.
and here is the function for climbing ladders:
and here is the code for the touch controls:
you can see in the inspector what I'm using to set up the touch controls and they are the same as the left/right controls.
Am I doing anything wrong? Where do I put the
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
98 People are following this question.
how to make touch to press a key
Vector3.back not working
How do I replicate how you launch the ball in this game?
iOS touch delay?
Touch control swipe up to jump