API ReferenceSandbox
SceneTraceclass
object→SceneTrace
Methods53
Showing 53 methods
public Sandbox.SceneTrace HitTriggers()
Hit Triggers
public Sandbox.SceneTrace HitTriggersOnly()
Hit Only Triggers
public Sandbox.SceneTrace IgnoreDynamic()
Do not hit dynamic objects
public Sandbox.SceneTrace IgnoreGameObject(Sandbox.GameObject obj)
Do not hit this object
| Parameter | Type | Description |
|---|---|---|
| obj | GameObject | — |
public Sandbox.SceneTrace IgnoreGameObjectHierarchy(Sandbox.GameObject obj)
Do not hit this object
| Parameter | Type | Description |
|---|---|---|
| obj | GameObject | — |
public Sandbox.SceneTrace IgnoreKeyframed()
Do not hit keyframed objects
public Sandbox.SceneTrace IgnoreStatic()
Do not hit static objects
public Sandbox.SceneTrace Radius(float radius)
Makes this trace a sphere of given radius.
| Parameter | Type | Description |
|---|---|---|
| radius | float | — |
public Sandbox.SceneTrace Rotated(Rotation rotation)
Makes this a rotated trace, for tracing rotated boxes and capsules.
| Parameter | Type | Description |
|---|---|---|
| rotation | Rotation | — |
public Sandbox.SceneTraceResult Run()
Run the trace and return the result. The result will return the first hit.
public System.Collections.Generic.IEnumerable`1<Sandbox.SceneTraceResult> RunAll()
Run the trace and record everything we hit along the way. The result will be an array of hits.
public Sandbox.SceneTrace UseHitboxes(bool hit = True)
Should we hit hitboxes
| Parameter | Type | Description |
|---|---|---|
| hit = True | bool | — |
public Sandbox.SceneTrace UseHitPosition(bool enabled = True)
Should we compute hit position.
| Parameter | Type | Description |
|---|---|---|
| enabled = True | bool | — |
public Sandbox.SceneTrace UsePhysicsWorld(bool hit = True)
Should we hit physics objects?
| Parameter | Type | Description |
|---|---|---|
| hit = True | bool | — |
public Sandbox.SceneTrace WithTag(string tag)
Only return entities with this tag. Subsequent calls to this will add multiple requirements and they'll all have to be met (ie, the entity will need all tags).
| Parameter | Type | Description |
|---|---|---|
| tag | string | — |
No results match this filter.