Method SetCollisionResponse
SetCollisionResponse(CollisionResponsePolicy)
Sets collision response. In case of a CompoundCollider, this behaves as SetCollisionResponse(CollisionResponsePolicy, ColliderKey) with ColliderKey.Zero passed in.
Declaration
public void SetCollisionResponse(CollisionResponsePolicy collisionResponse)
Parameters
Type | Name | Description |
---|---|---|
CollisionResponsePolicy | collisionResponse | The collision response. |
SetCollisionResponse(CollisionResponsePolicy, ColliderKey)
Sets collision response of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as SetCollisionResponse(CollisionResponsePolicy) . In case of CompoundCollider if the collider key is empty, it will set the collision response of the all children.
Declaration
public void SetCollisionResponse(CollisionResponsePolicy collisionResponse, ColliderKey colliderKey)
Parameters
Type | Name | Description |
---|---|---|
CollisionResponsePolicy | collisionResponse | The collision response. |
ColliderKey | colliderKey | The collider key. |