Search Unity

Animate square outline around a tile

Discussion in 'Animation' started by connorconway3, Apr 19, 2021.

  1. connorconway3

    connorconway3

    Joined:
    Mar 3, 2021
    Posts:
    3
    Hello all,

    I have a 2D top-down level and when you click a tile it displays an image outline to show that the tile has been clicked. My current implementation is the following:



    At the moment I am just disabling and enabling the outline (Which is an image) when a tile is clicked.
    I would like to extend this to animate a dotted line around the tile that is clicked. How could I go around doing this as I'm too overwhelmed with all the animation options.

    Something similar to this is what I am trying to describe:
    https://www.vecteezy.com/video/1791446-abstract-light-stroke-square-animation

    Thank you for any help you can give :)
     
  2. launzone

    launzone

    Joined:
    Dec 2, 2015
    Posts:
    57
    i guess it depends what your skill sets are/ what you are willing to learn. maybe a trail-renderer or particle effect moving in a square motion around the tile would be the simplest and still do the trick. I can imagine you could achieve something similar to your example using that.
    of course you can also create a frame by frame animation in another software like photoshop and play it in a loop. making it in the same style like you example sounds hard but you could explore different styles.
    effects like that are also commonly created with custom shaders if you want to get into that, might be the most time intensive option though if you don't have experience with it.