Make a one object Move

Hello ,

Time.timeScale=0f ;

stops every thing i.e pause . But i want only one object to move in the pause state (its a rigid body).

Any idea how to achieve that ?

hi if you are pausing game at TimeScale==0; then no body can move .Better idea to implement this thing pause the game at timescale greater then 0 like .7f or .1f and move rigid body at this timescale and do not move other one you do not want to move

You’d have to create a substitute for the static Time variable; All objects use this subsitute for moving etc., and ist set to the Time’s value every frame for as long as you don’t want tp “pause” the game. However, you one object that should still move while paused will use the actual Time value (or yet another substitute).

The only way I know to do this is by placing all objects you want to freeze into an array and freezing / disabling their rigid bodies and scripts. Time.timeScale is a static variable that’s tied into all time related functions and can not be used selectively.