# Sandbox.SceneTrace.WithCollisionRules

## Overload 1

```csharp
SceneTrace WithCollisionRules(string tag, bool asTrigger = False)
```

Use the collision rules of an object with the given tags.

### Parameters

- `tag` (`string`): Which tag this trace will adopt the collision rules of.
- `asTrigger` (`bool`), default `False`: If true, trace against triggers only. Otherwise, trace for collisions (default).

### Returns

`SceneTrace`

## Overload 2

```csharp
SceneTrace WithCollisionRules(IEnumerable<string> tags, bool asTrigger = False)
```

### Parameters

- `tags` (`IEnumerable<string>`)
- `asTrigger` (`bool`), default `False`

### Returns

`SceneTrace`

Declared in [Sandbox.SceneTrace](/api/Sandbox.SceneTrace).
Assembly: `Sandbox.Engine`.
