Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to mask spike trap in floor? [Solved]

Discussion in '2D' started by Caliber, Sep 14, 2018.

  1. Caliber

    Caliber

    Joined:
    Feb 11, 2018
    Posts:
    86
    I have 3 sprites: spikes, hole & mask. I want the spike to pop out of the hole, and when it's retracted, it's hidden by the mask.

    I can figure out the triggers and movement, but not the visual part. How do I use the mask with the spike?

    (I know it can be done with a spritesheet, but I'd prefer to do it like this)

    Edit: Solved! Sorry, I had misunderstood how the Sprite Mask object works
     
    Last edited: Sep 14, 2018