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
1
Question by DemianT · May 17, 2013 at 09:31 PM · colliderbugmoveenable

Colliders become 'semi-enabled' when moved

It appears that when I move a game object with a disabled collider, the collider becomes 'semi-enabled'. What I mean by 'semi-enabled' is that while running the game, after disabling and moving it, the inspector correctly says that it is disabled, but the Gizmo tool shows a dull green collider mesh (instead of the usual bright green), and as far as I can tell, it behaves as if it is enabled. Rigid bodies will interact with it as if it were enabled. Is this a bug or is it the intended behavior? If the latter, why?

Comment
Add comment · Show 6
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 clunk47 · May 17, 2013 at 09:45 PM 0
Share

Are you using a script to disable / enable / move the collider? If so please post the code so we can better understand and better help :)

avatar image DemianT · May 17, 2013 at 10:01 PM 0
Share

I'm not using a script. In my testing, I boiled the issue down to its pure essence. You can try it yourself. $$anonymous$$ake something with a collider. Disable the collider in the inspector (at run time or before). $$anonymous$$ove the object at run time (either in the inspector or in a script). And then, even though the collider says it is still disabled, things will collide with it.

avatar image Vonni · May 18, 2013 at 12:24 AM 0
Share

I call bs, will test! brb EDIT: Not true, moving on.

avatar image DemianT · May 18, 2013 at 08:37 AM 0
Share

O$$anonymous$$, for whatever reason, it isn't still happening when I 'boil it down to the essence'. However, it is still happening in the original scenario. I have a mesh that I generate at run time in the shape of a section of terrain. I attach a mesh collider. If I drop a rigid body ball on it, it behaves as expected. If I disabled the collider on the terrain and drop a ball, it falls straight through, as expected. However, if I then move the terrain a little bit in the inspector, and then drop another ball, it will behave as if the collider were enabled.

It may be worth pointing out that, normally, when you disable a collider at run time, it goes dark green when you have the Gizmo thingy enabled. With this terrain mesh collider, it just goes completely invisible when you disable the collider. But when you move it, it suddenly appears in dark green. And more confusingly, it behaves as if it were light green (enabled).

Anyone got any ideas?

avatar image TheScavenger101 · May 18, 2013 at 08:46 AM 0
Share

I've encountered this as well, when I had a plane infront of my fps cam it had mesh collider disabled until my character moved and the plane did as well then the collider activated and my character could walk on air, which was a cool enough effect but not what I wanted at all.

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by DemianT · May 23, 2013 at 05:28 PM

I submitted a bug report to Unity and they said that it is indeed a bug and they have sent it for resolution with the developers.

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
avatar image
0

Answer by iTris777 · Jul 01, 2013 at 01:54 PM

It is still true on Unity 4.1.4f on Mac OS X, for mesh colliders.

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
avatar image
0

Answer by StevoKeano · Nov 04, 2015 at 08:09 AM

Saw something similiar on a Unity3d 5.2 generated Android 6.0 app.
Have 2 terrains, 1 enabled at a time; but, the collider is still active and the Airplane landed in the air. over the grand canyon... Included a line to disable collider too; but, not yet tested. Code below.

 private void SetActiveTerrain(GameObject terrain)
 {
     terrain.GetComponent<Terrain>().enabled = true;
     terrain.GetComponent<Collider>().enabled = true;
 
 if (terrain.name != "Valles Marineris"){
     VallesMarineris.GetComponent<Collider>().enabled = false;
     VallesMarineris.GetComponent<Terrain>().enabled = false;
     }
 if (terrain.name != "GrandCanyon"){
     GrandCanyon.GetComponent<Collider>().enabled = false;
     GrandCanyon.GetComponent<Terrain>().enabled = false;
     }
 }

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

18 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

Related Questions

transform.position not working in OnControllerColliderHit 2 Answers

Disabled colliders picked up by OnTriggerEnter 0 Answers

Don't react to colliders in children. 0 Answers

How to disable collision detection while a UI Panel is enabled 2 Answers

Character - what collider? 2 Answers


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