Question by
FIVESIGN · May 20, 2016 at 08:18 PM ·
rigidbody2dfreezepowerup
Freeze all falling objects on y-axis
Hello unity community
I'm new to unity and making a fall & catch game as a project in my education. What I'm trying to achieve is to freeze all the objects seen on the screen that are falling down. The idea is, that the player can hit a button "PowerUp" and freeze all of the falling objects for 5 seconds, rearrange them and then the gravity sets in again. I've looked different codes, but all of them are only working on one object.
function Check () {
if (Time.timeScale == 1){
Time.timeScale = 0;
} else {
Time.timeScale = 1;
}
}
I've also tried with this type of code ... it freezes all objects in the scene, but you can't move them.
Anyone has an idea, how I can freeze all falling objects?
Thank you for your help ... appreciate it already!
Comment