Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Rigidbodies experience huge changes in velocity if they are colliding when I change Time.timeScale

$
0
0
I've tried to isolate my issue as much as possible, so I have a simple scene with with only one script that changes from regular speed to slow motion and back when you press space:
Code (CSharp):
  1.     void Update()
  2.     {
  3.         if(Input.GetButtonDown("Jump"))
  4.         {
  5.             if(Time.timeScale == 1)
  6.                 Time.timeScale = 0.003f;
  7.             else Time.timeScale = 1;
  8.             Time.fixedDeltaTime = Time.timeScale * 0.02f;
  9.         }
  10.     }
In slow motion, collisions cause...

Rigidbodies experience huge changes in velocity if they are colliding when I change Time.timeScale

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>