Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Dec 21, 2014 at 12:02 AM by AlucardJay for the following reason:

not a Unity specific technical question

avatar image
0
Question by CodeTurtle · Dec 19, 2014 at 11:16 PM · layersbackgroundinvisible

A question about wack-a-mole games

https://www.youtube.com/watch?v=4R61n2yKn5M

Like the wack-a-mole game in this link. How does it manage to have the mole vanish inside the hole? It obviously doesn't have enough space for the entire mole to hide down there if I want to use another sprite to cover it up. And making the mole and background different layers would not help, since the bottom of the mole is below the background but the top of it is on top of the background.

I'm very appreciated if anyone can help><.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CodeTurtle · Dec 20, 2014 at 01:37 AM 0
Share

What do you mean? Is it that too simple to ask? :<

avatar image CodeTurtle · Dec 20, 2014 at 01:53 AM 0
Share

It's all right, not taken :)

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by NoseKills · Dec 20, 2014 at 12:43 AM

Pretty sure they are 3D models that pop up from under the other model that is the "board". The holes are black meshes too so the moles are not visible under them.

If you stop the video at a time when the mole's helmet is poking through the black "film" of a hole, you can see the ~10 sides of the helmet mesh (it's not perfectly round)

You can do the same with 2D as explained in the comments. Here's an image to explain it better whack a mole layering

Of course you need to close the gaps to make it look like 1 image.


moles.jpg (114.5 kB)
Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CodeTurtle · Dec 20, 2014 at 01:36 AM 0
Share

Wow, I didn't think of that before. Thanks.

But I'm trying to make the same effect with only 2D sprites, I wonder if it is possible?

Thank you for your answer though, too bad that I don't have enough karma to vote it up :(

avatar image NoseKills · Dec 20, 2014 at 01:48 PM 0
Share

You can do it in 2D by slicing the board graphic (that has the holes) into many slices horizontally.

Start going upwards from the bottom of the board image and slice the board image horizontally from the middle of every hole. Use the first/bottom slice as you foreground graphic and place the first mole graphic behind this layer in sorting order. SLice the remaining graphic again at the height of the second hole, place this slice behind the first mole and then place another mole behind this slice... and so on.

I can't upload an image because the question is closed :(

avatar image AlucardJay · Dec 20, 2014 at 03:10 PM 0
Share

not sure why you cannot edit the answer (to include image), reopened.

avatar image CodeTurtle · Dec 20, 2014 at 04:05 PM 0
Share

O$$anonymous$$....not sure what just happened, but thanks for reopening it.:D

avatar image meat5000 ♦ · Dec 20, 2014 at 04:20 PM 0
Share

This needs to be closed. Not a Unity Question.

Show more comments

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Set a constant 2d background? 2 Answers

GameObject behind the background 0 Answers

How to set background for 2D game. 1 Answer

How to make background for 2D game 3 Answers

GameObject With Background Covers GameObject Without Background 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges