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?
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.
It is still true on Unity 4.1.4f on Mac OS X, for mesh colliders.
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;
}
}