Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
2
Question by verity147 · Jan 30, 2018 at 04:50 PM · physics2dcollider2ddisableenable

Can CompositeCollider2D not be disabled?

I have an Object with a CompositeCollider2d that merges the colliders of several child objects (the limbs of my player). However, I need all of them to be disabled in the beginning of the game. There is no Checkbox on the CompositeCollider2d in the inspector and neither does GetComponent<CompositeCollider2d>().enabled = false; do anything.

The documentation claims that "enabled" is an available property on CompositeCollider2d. The object has a Rigidbody2D on the same element as the CompositeCollider2d and behaves as expected everywhere else.

What is the problem?

Comment
Add comment · Show 3
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 pako · Jan 30, 2018 at 07:37 PM 1
Share

Only the components that have a checkbox in the Inspector can be enabled/disabled. So, it seems that the documentation is wrong in this case.

avatar image TreyH · Jan 30, 2018 at 09:29 PM 1
Share

As a silly workaround, if you're using it as a traditional collider, can you change it to a Trigger ins$$anonymous$$d of disabling it? That would disable actual collisions until you returned it to normal.

avatar image pako TreyH · Jan 30, 2018 at 10:57 PM 2
Share

Another workaround would be to change the GameObject's layer to one that is set to not interact with other layers.

1 Reply

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

Answer by verity147 · Jan 31, 2018 at 10:58 AM

I guess I will change the layer to IgnoreRaycast and back, but apparently this also means the docs are wrong.

Comment
Add comment · Show 1 · 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 pako · Jan 31, 2018 at 12:35 PM 1
Share

...or you could create a new layer, e.g. "IgnoreCollisions", and assign that (after unchecking all its checkboxes in the Layer Collision $$anonymous$$atrix of the Physics2DSettings).

The documentation is wrong in many instances, and we can help fix it:

  • either though the Unity Bug Reporter - Unity Help $$anonymous$$enu/Report a Bug... and select for "What is the problem related to": "Documentation"

  • or by navigating to the documentation page with the problem, and at the bottom of the page, click on the link "Report a problem on this page", and then on a link, such as "Information is incorrect".

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

78 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 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 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 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 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

How to change settings to a rigidbody when adding it to a gamobject? 2 Answers

image not enabling 0 Answers

Weird behaviour after Collision? 0 Answers

Enable/Disable Game Object With GUI Button 1 Answer

Enabling loop and disabling loop 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