Cubes coming downing(vertically) and they will collide line,so what should i do for this means use of parallel-ex scrolling apply on these cubes or transform.translate or transfrom.movetowards give me your suggestion which is best way to achieve this.one thing more when cube collide with line everything should stop moving.
If you are just moving the cubes downwards in a straight line, you can just use transform.translate
//put this inside the Update gameObject.transform.Translate(0,-(time.deltaTime * 0.5f), 0); //if the gameobject reaches the bottom (you'll have to change this to your fitting) if (gameobject.transform.position.y <= 0) //pool it orsomething
You can use Time.timeScale and set the value to 0f. It basically freezes time and you can also give it cooler effects like slowing down when you hit the line.
Time.timeScale = 0f;