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 /
avatar image
0
Question by Entyro · Oct 24, 2013 at 10:43 AM · scenetop downhouse

Top down house Help

Hi!

I'm planning on making a sort of top down game. I'm wondering about one thing.

As you can see on the image bellow, you are in a house and there's a black background around it. My question is, how do you make a house that you can walk in to and then that black background appears. Do you need to have a new scene or what's the best idea to do here? I already have a script that can teleport you to one location to another, and if I use that to teleport the character to a house, I can't figure out how I'm supposed to have a black background around the room.

Does anyone understand and knows how to do that?

alt text

house.png (132.0 kB)
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by EvilWarren · Oct 24, 2013 at 11:02 AM

First off, epic moustache on that character there.

Create and set the appropriate layers for the game objects you want to display then just set the camera culling mask to cull everything else when you enter the house. And set the camera backgroundColor to black.

If you're not to sure on layers: http://docs.unity3d.com/Documentation/Components/Layers.html

Comment
Add comment · Show 3 · 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 Entyro · Oct 24, 2013 at 12:05 PM 0
Share

How to I disable the layers from the camera(s) I don't want to show when I'm in the house? I walk on a trigger that teleports me to a certain point in the house using a teleport script with a fade effect, but do I need to add a line of text in the script which layers I don's want to show on TriggerEnter?

avatar image EvilWarren · Oct 24, 2013 at 02:20 PM 0
Share

To hide layers:

 Camera.mainCamera.culling$$anonymous$$ask &=  ~(1 << Layer$$anonymous$$ask.NameToLayer("HideSomeStuffLayer"));

To show layers:

 Camera.mainCamera.culling$$anonymous$$ask |= 1 << Layer$$anonymous$$ask.NameToLayer("ShowSomeStuffLayer");

OnTriggerEnter() would be an appropriate place to add it if thats where you switch to this inside house view. Also make sure the mask names correspond to whatever layers you have created and assigned with the tag manager.

avatar image Entyro · Oct 24, 2013 at 03:44 PM 0
Share

Awesome, works perfectly. Thanks! :D

avatar image
0

Answer by Sisso · Oct 24, 2013 at 11:03 AM

Do like everything else, renderers and colliders. The black area is simple a big mesh with a hole using an black texture that stay between camera and the objects.

Comment
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Main Menu: Is it better to subdivide it into different scenes? 1 Answer

How to I create an enterable building/ or town scene? 1 Answer

Water Glitch from Near Clipping Plane. 0 Answers

NullReferenceExeption: Object reference not set to an instance of an object. 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