Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

How to make effect like this

Discussion in 'Scripting' started by Eiseno, Sep 3, 2019.

  1. Eiseno


    Nov 1, 2015
    Hello guys,
    I have game with multiple cubes when game is over i want to make effect like this. How can i make that ? Cubes rotating and shake effect

    Best Regards
  2. Yoreki


    Apr 10, 2019
    There are different ways of doing this. You could, for example, just trigger an animation that does what you want. For a game similar to what is shown in the video, this may be a good idea.

    If you use 3d cubes anyways, you could also make the cubes fly upwards and "animate" them yourself, by applying a sine wave over time to their y coordinates. That way the cubes will fly up and down a bit, following the wave pattern. Combining multiple functions to control the y (or other) coordinate, you can end up with some fancy effects.
    Even very nice effects like these, are effectively nothing else than controlling the y coordinate over time:
    Last edited: Sep 3, 2019
    Kurt-Dekker likes this.