How would physics act when time.Timescale is set to 0?

Hi

I'm planning to add some cool features to my game. One of which allows users to pause the game and then move the gameobjects around.

Before i do that, can someone tell me if the two objects can still colide with each other when time.TimeScale is set to 0?

Sorry if the question is unclear.

Here is my idea: I have two objects on the air (A and B). When the objects fall down, i set time.TimeScale to 0 so the objects will stay at the current positions, then i use the mouse to move A around. Can i push B to somewhere else by moving A?

Thanks

1 Answer

1

No. If time is frozen, pretty much nothing will occur.

It sounds like for what you want to do, you'll need to do some extra scripting. For instance, when you "pause" the game, don't do anything to the time scale. Instead, set the velocity of all physics objects to zero and eliminate gravity. That might get the effect you want, but I'm not totally sure what you're trying to achieve.

I forget exactly what, but yeah. For the sake of simplicity I just said pretty much nothing, but for instance I know that GUI events will still take place while the time scale is zero (making it very easy to pause the game and still have a functioning menu).

Everything not dependent on time still works. Like all GUI.