Search Unity

How to make effect like this

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

  1. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    86
    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

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    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.