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 MC HALO · May 09, 2011 at 06:09 AM · layersmaskculling

Help with layers?

Hi all, i was wondering if some one could help me. Basically the question is i have a object and it has a layer on it called wall. Now what i want is you see how the camera has a Culling Mask and it allows to to pick what layers the camera will avoid how can i do this to an normal object so it can avoid objects that have layers on them please help me thank you very much in advance :) MCHALO

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

1 Reply

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

Answer by CHPedersen · May 09, 2011 at 06:18 AM

You simply select the layer that particular object is in. For a GameObject, look in the inspector, second line from the top. By default, it'll be in the "Default"-layer. Expand that dropdown and select another layer, then remove that other layer from the Camera's culling mask. That camera now no longer renders that object.

Edit:

For the usage of Layers in collision detection, you can refer to this article, from Unity's documentation:

http://unity3d.com/support/documentation/Components/Layer%20Based%20Collision%20detection.html

Comment
Add comment · Show 5 · 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 MC HALO · May 09, 2011 at 08:13 AM 0
Share

It still wont work the player will still collied with the object. i need the main object to avoid the wall not the cam

avatar image CHPedersen · May 09, 2011 at 08:24 AM 0
Share

Aaah, sorry, I didn't read your question properly. Take a look at this article: http://unity3d.com/support/documentation/Components/Layer%20Based%20Collision%20detection.html

It explains layerbased collision detection.

avatar image Bunny83 · May 09, 2011 at 09:13 AM 0
Share

Well, you could add it to your answer and you get your upvote ;)

avatar image CHPedersen · May 09, 2011 at 12:33 PM 0
Share

It is hereby done. :)

avatar image MC HALO · May 10, 2011 at 09:54 AM 0
Share

fantastic, you are a life saver :) cheers

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

No one has followed this question yet.

Related Questions

How do I get my camera to render 2 culling masks in scripts? 2 Answers

The Child Is Not Hovered When Passing The Parent's Collider 0 Answers

Only render objects behind specific object 1 Answer

Lightmap Culling Mask woes. 1 Answer

Sprite Mask Render Issue 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