Author Topic: Strange problem with timeScale and collision boxes  (Read 1477 times)

Rajken

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 12
    • View Profile
Strange problem with timeScale and collision boxes
« on: August 27, 2014, 05:16:00 AM »
In the game I have a Pause menu that has some UISliders that uses thumb to control the value. so the thumb is the only one that has a collider and when i open this menu I set the Time.timeScale = 0.
The first time I use the slider everything work fine with dragging but when I let go I will not be able to click on the button again because the Physics.RaycastAll cant find it anymore
I have found out that the problem is that the FixedUpdate is never called when time.timeScale is set to 0 and FixedUpdate is the thing that updates the position of the boxcolliders that Physics uses.

So the only solution i have found it to unpause the game and then wait for a FixedUpdate to happen and then pause the game again. I know that i could change how the sliders works but i have a similar problem with some other buttons as well.

So my question is do anyone else have this problem and how did you solve it? Or is there any other fix for this problem?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Strange problem with timeScale and collision boxes
« Reply #1 on: August 28, 2014, 08:13:04 PM »
Can't say I've ran into this one before. So moving the collider doesn't reflect in the raycasts? Unusual... if this is indeed true I'm surprised why no one has run into this before in the 3 years...