Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Simulation of a hole in the game

Discussion in '2D' started by Stelette, Sep 24, 2020.

  1. Stelette

    Stelette

    Joined:
    Nov 3, 2017
    Posts:
    17
    Hello,tell me how you can make a simulation of the hole or make the hole itself, so that it was like in the game?(I considered the option of masks,but then it turns out that I need to make the upper part of the hole through many separate sprites?(the"far" wall of the hole is blocked by the ball,but the outer wall is no longer there(which is closer to the player visually).An example from the game (attached photo):
    The game itself: http://www.game-game.com.ua/184002/ . Sorry for my English,thank you in advance
     

    Attached Files:

  2. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    z.png
    you create a mask on this red area, make the ball visible only outside the mask. When the ball falls through the hole it will disappear as it passes through the mask.
     
    Stelette likes this.
  3. Stelette

    Stelette

    Joined:
    Nov 3, 2017
    Posts:
    17
    Thank you for your response.