Search Unity

single touches when grounding/jumping on cube, double touches when grounding/jumping on terrain???!?

Discussion in 'Scripting' started by JVDesign, Nov 28, 2014.

  1. JVDesign

    JVDesign

    Joined:
    Aug 3, 2012
    Posts:
    32
    Ok, I've been trying to figure this out for 2 weeks with no success.

    I have a rigidbody character that can move left/right jump and has 1 action.

    Here is what happens exactly: I have a large cube in the map, when I jump off of it and then hit my action it registers once. When I move onto my terrain object and do the exact same thing it registers twice...sometimes..., sometimes it seems like it's registering 3 or 4 times for a single touch.

    I've pored over the code for some kind of logic flaw but I just haven't found it.
    I've tried changing the touch input system from Control Freak to inControl and it makes no difference.

    I've tried doing everything in FixedUpdate, Update, and also getting the touch into into variables in update, then doing the character movements in FixedUpdate, nothing seems to work.

    If this is some kind of known issue, or I'm doing something obviously wrong please let me know.
     
  2. MuffinMyst

    MuffinMyst

    Joined:
    Nov 17, 2014
    Posts:
    13
    if you are willing to post your code it might be easier for someone to pinpoint a problem