# useOneWay

> Should the one-way collision behaviour be used?

## Definition

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

```csharp
public bool useOneWay { get; set; }
```

### Remarks

When true, collisions are only allowed when the linear velocity, transformed into the local-space of the target [Collider2D](/engine/6000.7/script-reference/unityengine/collider2d.md), are less than zero.  For [Collider2D](/engine/6000.7/script-reference/unityengine/collider2d.md) that are not rotated in Z, this equates to a vertical velocity less than zero.

Additional Resources: [\_useOneWayGrouping](/engine/6000.7/script-reference/unityengine/platformeffector2d/useonewaygrouping.md)
