So I am new to coding and Unity. The game I made is a player who is collecting falling items. Now I want to add a feature where if the player catches a falling clock then the whole scene will freeze for few seconds allowing the player to collect the items on the screen. After the freeze time expires, everything should resume the exact way as it was before. What is the best way to implement this? Is there something in Unity already for this.
Thank you everyone for your help and patience.
Note: there are several kinds of objects and they are in different speeds and rotations, I am using gravity and transform for motion.
Note2: so I want the player to keep moving and only freeze the rest of the objects.
You could also just enable/disable the object’s rigidbody altogether, or set certain attributes of the rigidbody to true or false (like Use Gravity, or Lock Moving and Rotating). Read the Unity manual for Rigidbody to see what you might want to change.
I found a way. I used a a variable that multiplies with the velocity of all moving objects in the scene . I set the variable =1 all the time, but when the player picks up the “freezing” item, I change the variable temporarily to 0 so the Velocity*0 = 0 will freeze the moving objects, until the variable is changed back to 1. It worked perfectly!