Tanoda
Leap.Unity.Examples.IgnoreCollisionsInChildren Class Reference

This utility script scans through its Transform's children and tells PhysX to ignore collisions between all pairs of Colliders it finds. This is particlarly useful, for example, for interfaces, where buttons shouldn't collide with other buttons. More...

Inheritance diagram for Leap.Unity.Examples.IgnoreCollisionsInChildren:

Static Public Member Functions

static void IgnoreCollisionsInChildrenOf (Transform t, bool ignore=true)
 

Detailed Description

This utility script scans through its Transform's children and tells PhysX to ignore collisions between all pairs of Colliders it finds. This is particlarly useful, for example, for interfaces, where buttons shouldn't collide with other buttons.

This is not the recommended strategy in general: It is much more optimal for your application to put interface objects on a layer and disable self-collision for that layer in your Physics settings (Edit / Project Settings / Physics).

Definition at line 25 of file IgnoreCollisionsInChildren.cs.

Member Function Documentation

◆ IgnoreCollisionsInChildrenOf()

static void Leap.Unity.Examples.IgnoreCollisionsInChildren.IgnoreCollisionsInChildrenOf ( Transform  t,
bool  ignore = true 
)
static

Definition at line 31 of file IgnoreCollisionsInChildren.cs.


The documentation for this class was generated from the following file: