# Vector3.WithAimCone

## Overload 1

```csharp
Vector3 WithAimCone(float degrees, System.Random random = null)
```

This direction randomly deflected within a cone `degrees` wide, centred on it.
Use for bullet spread. Pass a `random` to control the randomness (e.g. a seeded
one, so peers agree on the deflection) - null uses the shared random.

### Parameters

- `degrees` (`float`)
- `random` (`System.Random`), default `null`

### Returns

`Vector3`

## Overload 2

```csharp
Vector3 WithAimCone(float horizontalDegrees, float verticalDegrees, System.Random random = null)
```

This direction randomly deflected within a cone `horizontalDegrees` wide and
`verticalDegrees` tall, centred on it. Use for bullet spread. Pass a
`random` to control the randomness (e.g. a seeded one, so peers agree on the
deflection) - null uses the shared random.

### Parameters

- `horizontalDegrees` (`float`)
- `verticalDegrees` (`float`)
- `random` (`System.Random`), default `null`

### Returns

`Vector3`

Declared in [Vector3](/api/Vector3).
Assembly: `Sandbox.System`.
