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 test84 · Nov 19, 2012 at 03:31 PM · collisionlayer

Use IgnoreCollision and IgnoreLayerCollision together?

Hi,

Is it possible to use these two together? I'm setting my two objects to two different layers and use IgnoreLayerCollision so they don't collide with each other but under some circumstance I want one or two of those to collide with the other layer again.

I tried it but it didn't work so I may be missing something.

What I did is what I described and then when one of them enters a trigger, I put IgnoreCollision with that object and some colliders that are in layer that is in that IgnoreLayerCollision but it seems IgnoreLayerCollision has a higher priority.

Am I missing or it's the way things are in Unity?

I basically want to ignore that Layer with IgnoreCollision.

Thanks!

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
1

Answer by sparkzbarca · Nov 19, 2012 at 03:49 PM

just use a 3rd layer. :P

layer 3 is the SOMETIMES layer. It includes both objects from the different layers and is used as the collision layer in the event you want them to collide.

so

 object A is part of layer A and Layer C
 object B is part of layer B and Layer C
 
 Layer C is used as the collision layer when you want collisions between them.

Mark as answered and have a nice day. :)

Comment
Add comment · Show 2 · 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 test84 · Nov 24, 2012 at 12:29 AM 0
Share

You do realize that one object cannot be part of more than one layer, right?

avatar image sparkzbarca · Nov 24, 2012 at 07:49 PM 0
Share

really? nope didn't know that. I haven't used collision layers. Seems kinda abitrary but im don't know how codewise the layering system works so I guess maybe its needed?

I just figured it was some kind of if object.layer == layer i'm looking for, its a hit, else cast through the collider.

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

10 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

Related Questions

Ignore Collision Layer Ignores also other layers 1 Answer

Changing layers affect triggers? 1 Answer

How to tell if my character hit a collider of a certain layer 1 Answer

How to make a rigidbody bullet move through a platform? 1 Answer

Collision Matrix not working as intended 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