How to disable collision, but keep gravity

im using this.sphereCollider.enabled = false in order to disable a collider. The object has a rigidbody using gravity and a sphere collider. Everything is set correctly and that statement does indeed set enabled to false (based on logs) - but for some reason collision continues happening. Any idea why?

Original Post on Discord

by user 352282921056468993

Can you visualize the colliders in your scene by adding ?showColliders to your url?

hmm didnt see a change after doing that

by user 352282921056468993

Ah sorry it’s ?showcolliders (all lowercase)

Woah that’s a cool tool! So the collider for that object is getting disabled, but gravity is no longer applied. Does there need to be a collider for the rigidbody to apply gravity?

by user 352282921056468993

I’m not sure if I understand what is happening - can you show some screenshots from Unity/the website and maybe a video or live link? :slightly_smiling_face:

think it’s a bit too complex to share. Do you know if there are any sample projects where a collider is working and it is then disabled so the object falls through other objects

by user 352282921056468993

Yep the animated physics sample