Been googling around and scratching my head about this for a couple days. Last best guess; Code (CSharp): using UnityEngine; using System.Collections; public class collisionwhitelist : MonoBehaviour { public GameObject[] whitelist; void Start() { foreach(GameObject go in whitelist) { Debug.Log("yes"); Physics.IgnoreCollision(go.GetComponent<Collider>(), this.GetComponent<Collider>(), ignore:false); } } } on object set to a layer 'whitelisted' which is configured by settings->physics to interact with nothing (not even itself). But this doesn't work - best I can guess is that the Layer Based Physics totally override IgnoreCollision()? Anyone have any idea how to go about this? Immediate use is to make an invisible wall to stop the return of a nice squishy physics (ConfigurableJoint) -based button (and I can foresee many similar uses, for physics gizmo prefabs). Is this even the right way to do this? I've also played with adding a second ConfigurableJoint with no spring, but that seems to be very bad (unpredictable physics behavior, choppy acceleration/deceleration).
ya physics settings will override the code you're trying. You cant turn on collisions when they are configured off