> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/mobile-traffic-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/mobile-traffic-system/complete-api/disableareawaypoints.md).

# DisableAreaWaypoints

### Description

Disables all the waypoints from a given circular area defined by its center and radius. Vehicles will not be able to cross over these waypoints and will not instantiate on top of disabled waypoints.

### Declaration&#x20;

```csharp
public static void ClearTrafficOnArea(Vector3 center, float radius)
```

### Parameters

<table><thead><tr><th width="188">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>center</strong></td><td>The center of the circle to disable waypoints from.</td></tr><tr><td><strong>radius</strong></td><td>The radius in meters of the circle to disable waypoints from.</td></tr></tbody></table>

### Example

```csharp
using Gley.TrafficSystem;
using UnityEngine;

public class Test : MonoBehaviour
{
    //a reference to vehicle pool and player assigned in inspector
    public VehiclePool vehiclePool;
    public Transform player;

    void Start()
    {
        API.Initialize(player, 20, vehiclePool);
    }

    public void DisableWaypoints()
    {
        //disable all waypoints 20m around the player 
        API.DisableAreaWaypoints(GameObject.Find("Player").transform.position, 20);
    }
}

```
