removeCollider() public static method

removes the collider from the physics system
public static removeCollider ( Collider collider ) : void
collider Collider Collider.
return void
Beispiel #1
0
 /// <summary>
 /// the parent Entity will call this at various times (when removed from a scene, disabled, etc)
 /// </summary>
 public virtual void unregisterColliderWithPhysicsSystem()
 {
     if (_isParentEntityAddedToScene)
     {
         Physics.removeCollider(this, true);
     }
 }
Beispiel #2
0
 /// <summary>
 /// the parent Entity will call this at various times (when removed from a scene, disabled, etc)
 /// </summary>
 public virtual void unregisterColliderWithPhysicsSystem()
 {
     if (_isParentEntityAddedToScene && _isColliderRegistered)
     {
         Physics.removeCollider(this);
     }
     _isColliderRegistered = false;
 }
        public void removeColliders()
        {
            if (_colliders == null)
            {
                return;
            }

            foreach (var collider in _colliders)
            {
                Physics.removeCollider(collider);
            }
            _colliders = null;
        }