PhysicsMaterial2D.GetCombinedValues

Declaration

public static float GetCombinedValues(float valueA, float valueB, PhysicsMaterialCombine2D materialCombineA, PhysicsMaterialCombine2D materialCombineB);

Parameters

valueA Friction or bounciness value used by one Collider2D.
valueB Friction or bounciness value used by another Collider2D.
materialCombineA The combined mode used by one Collider2D.
materialCombineB The combined mode used by another Collider2D.

Returns

float The effective friction or bounciness value used in the collision response.

Description

Calculates the effective value used when two Collider2D come into contact with their own PhysicsMaterial2D.

You can use this method to determine the exact friction or bounciness value applied when two Collider2D come into contact.


Did you find this page useful? Please give it a rating: