# GetCombinedValues(float, float, PhysicsMaterialCombine2D, PhysicsMaterialCombine2D)

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

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

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

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Friction or bounciness value used by one [Collider2D](/engine/6000.5/script-reference/unityengine/collider2d.md).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Friction or bounciness value used by another [Collider2D](/engine/6000.5/script-reference/unityengine/collider2d.md).**** (\[PhysicsMaterialCombine2D]\(/engine/6000.5/script-reference/unityengine/physicsmaterialcombine2d)): The combined mode used by one [Collider2D](/engine/6000.5/script-reference/unityengine/collider2d.md).**** (\[PhysicsMaterialCombine2D]\(/engine/6000.5/script-reference/unityengine/physicsmaterialcombine2d)): The combined mode used by another [Collider2D](/engine/6000.5/script-reference/unityengine/collider2d.md).

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The effective friction or bounciness value used in the collision response. |

### Remarks

You can use this method to determine the exact friction or bounciness value applied when two [Collider2D](/engine/6000.5/script-reference/unityengine/collider2d.md) come into contact.
