Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Continuous input when pausing game

Discussion in 'Editor & General Support' started by Trollg, May 22, 2014.

  1. Trollg

    Trollg

    Joined:
    May 22, 2014
    Posts:
    13
    Hi,
    I get a very strange bug when pausing my game. I am using NGUI for my gui.
    When the game is paused (timescale = 0) while the player is moving (by the standard axis input) the pause menu buttons keep getting activated one after the other and the OnKey function (UIButtonKeys Class) gets called at every frame even without pressing any button... If the player doesnt move when the pause menu is activated, it plays as expected. Also, when I comment out the timescale = 0 the menu works as expected. Any ideas how to prevent this from happening? Its like the input gets stuck when timescale gets 0 when an axis key is pressed when that happens.

    I would much apreciate any help since I am in a close deadline and had trouble with this for sometime now...
    Thanx
     
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Unless you show us the problem codes, we can only guess. Have you tried setting it to something slightly above 0? I've encountered problems with time scale 0 before and got around it by setting it to .00001.