ColliderGroup
A class in Root.Township, the global namespace.
A ComponentGroup of colliders with helpers to switch them on and off, set their layer, and ignore collisions with other colliders.
- Listed in Global namespace: C to D
- Inherits or implements
ComponentGroup<Collider> - Derived types
NetworkColliderGroup
Constructors
| Member | What it is |
|---|---|
ColliderGroup() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
Methods
| Member | What it is |
|---|---|
static IEnumerator IgnoreCollisionsCoroutine(IEnumerable<Collider> colliders, IEnumerable<Collider> otherColliders, float secondsToIgnore = 0.1) (iterator) | Coroutine that ignores collisions between two sets of colliders for a time, then restores them. |
static AltaCoroutine IgnoreCollisionsForDuration(IEnumerable<Collider> colliders, IEnumerable<Collider> otherColliders, MonoBehaviour nullCheck, float secondsToIgnore = 0.1) | Starts IgnoreCollisionsCoroutine, stopping if the given behaviour is destroyed. Default 0.1 seconds. |
void IgnoreSelf(bool isIgnoring = true) | Makes the group's colliders ignore each other (or stop ignoring). Runs on Start if set to. |
virtual void SetActive(bool isEnabled) | Enables or disables every collider in the group. |
void SetIgnore(Collider ignore, bool isIgnoring) | Ignores or restores collision between the group and a collider, another group, or a list of colliders. |
void SetIgnore(ColliderGroup ignore, bool isIgnoring) | Ignores or restores collision between the group and a collider, another group, or a list of colliders. |
void SetIgnore(IEnumerable<Collider> ignore, bool isIgnoring) | Ignores or restores collision between the group and a collider, another group, or a list of colliders. |
void SetLayer(int layer) | Moves every collider's object to a layer. |
protected virtual void IgnoreCollision(Collider thisCollider, Collider otherCollider, bool isIgnoring) | Ignores or restores collision between two colliders. Subclasses can override it. |
protected override bool IsElementValid(Collider element) | Skips trigger colliders when the group does not accept triggers. |
protected override void OnValidate() | Editor hook. Does nothing useful. |
1 private and internal method
Used in
Members of other types that take, return or hold a ColliderGroup:
ChisellingDeck.colliderGroup, TimberBlock.colliderGroup, TimberBlock.ColliderGroup, CharacterCollisionController.collidersMap, CharacterCollisionController.CollidersToDisableWhenInteracting.collidersToDisable, CharacterCollisionController.CollidersToDisableWhenInteracting.CollidersToDisable, CharacterCollisionControllerHelper.ReplaceColliderGroup, InteractionCollisionController.colliders, PlayerCharacter.bodyColliderGroup, PlayerCharacter.BodyColliderGroup, EmbeddableManager.collidersToAddTo, Agent.collision, Agent.Collision, IAgent.Collision, LockableHinge.baseColliders, AnimatedRagdoll.colliders, CustomizationPlayerController.GetHandCollidersForInteractor, CustomizationPlayerController.leftGhostHandColliders, CustomizationPlayerController.rightGhostHandColliders, ExtraArrowUpdater.ExtraArrowData.ColliderGroup, LocomotionlessPlayerController.leftGhostHandColliders, LocomotionlessPlayerController.rightGhostHandColliders, MainMenuPlayerController.GetHandCollidersForInteractor, MainMenuPlayerController.leftGhostHandColliders, MainMenuPlayerController.rightGhostHandColliders, Projectile.colliders, Projectile.Colliders, Projectile.disabledAgainst, Projectile.Shoot.