Unity Play Logo
Showcases
How to
Notifications

30
Pause (V)
Stop (B)
19 Jun 2022
Cubes move, rotate and change color between a random color and their initial random color. Press R to restart the scene. It may look like some physics was used but actually nothing like that was used, the cubes are just enclosed in invisible box (which is set with the code like coordinates can be only between -10 and 10) so eventually it "hits" that wall and the rotation does the rest while the cubes are being pushed forward with `transform.Translate`
Cubes move, rotate and change color between a random color and their initial random color. Press R to restart the scene. It may look like some physics was used but actually nothing like that was used, the cubes are just enclosed in invisible box (which is set with the code like coordinates can be only between -10 and 10) so eventually it "hits" that wall and the rotation does the rest while the cubes are being pushed forward with `transform.Translate`
Made with
Copied to clipboard