# Sandbox.SceneTrace

- Kind: struct
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Fields

- [`PhysicsTrace`](/api/Sandbox.SceneTrace/PhysicsTrace)

## Methods

- [`Body`](/api/Sandbox.SceneTrace/Body): Casts a PhysicsBody from its current position and rotation to desired end point.
- [`Box`](/api/Sandbox.SceneTrace/Box): Casts a box from point A to point B.
- [`Capsule`](/api/Sandbox.SceneTrace/Capsule): Casts a capsule
- [`Cone`](/api/Sandbox.SceneTrace/Cone): Casts a cone (base at bottom, apex at top).
- [`Cylinder`](/api/Sandbox.SceneTrace/Cylinder): Casts a cylinder
- [`FromTo`](/api/Sandbox.SceneTrace/FromTo): Sets the start and end positions of the trace request
- [`HitTriggers`](/api/Sandbox.SceneTrace/HitTriggers): Hit Triggers
- [`HitTriggersOnly`](/api/Sandbox.SceneTrace/HitTriggersOnly): Hit Only Triggers
- [`IgnoreDynamic`](/api/Sandbox.SceneTrace/IgnoreDynamic): Do not hit dynamic objects
- [`IgnoreGameObject`](/api/Sandbox.SceneTrace/IgnoreGameObject): Do not hit this object
- [`IgnoreGameObjectHierarchy`](/api/Sandbox.SceneTrace/IgnoreGameObjectHierarchy): Do not hit this object
- [`IgnoreKeyframed`](/api/Sandbox.SceneTrace/IgnoreKeyframed): Do not hit keyframed objects
- [`IgnoreStatic`](/api/Sandbox.SceneTrace/IgnoreStatic): Do not hit static objects
- [`Radius`](/api/Sandbox.SceneTrace/Radius): Makes this trace a sphere of given radius.
- [`Ray`](/api/Sandbox.SceneTrace/Ray): Casts a ray from point A to point B.
- [`Rotated`](/api/Sandbox.SceneTrace/Rotated): Makes this a rotated trace, for tracing rotated boxes and capsules.
- [`Run`](/api/Sandbox.SceneTrace/Run): Run the trace and return the result. The result will return the first hit.
- [`RunAll`](/api/Sandbox.SceneTrace/RunAll): Run the trace and record everything we hit along the way. The result will be an array of hits.
- [`Size`](/api/Sandbox.SceneTrace/Size): Makes this trace an axis aligned box of given size. Extracts mins and maxs from the Bounding Box.
- [`Sphere`](/api/Sandbox.SceneTrace/Sphere): Casts a sphere from point A to point B.
- [`Sweep`](/api/Sandbox.SceneTrace/Sweep): Sweeps each [PhysicsShape](/api/Sandbox.PhysicsShape) of given PhysicsBody and returns the closest collision. Does not support Mesh PhysicsShapes. Basically 'hull traces' but with physics shapes. Same as tracing a body but allows rotation to change during the sweep.
- [`UseHitboxes`](/api/Sandbox.SceneTrace/UseHitboxes): Should we hit hitboxes
- [`UseHitPosition`](/api/Sandbox.SceneTrace/UseHitPosition): Should we compute hit position.
- [`UsePhysicsWorld`](/api/Sandbox.SceneTrace/UsePhysicsWorld): Should we hit physics objects?
- [`UseRenderMeshes`](/api/Sandbox.SceneTrace/UseRenderMeshes): Should we hit meshes too? This can be slow and only works for the editor.
- [`WithAllTags`](/api/Sandbox.SceneTrace/WithAllTags): Only return entities with all of these tags
- [`WithAnyTags`](/api/Sandbox.SceneTrace/WithAnyTags): Only return entities with any of these tags
- [`WithCollisionRules`](/api/Sandbox.SceneTrace/WithCollisionRules): Use the collision rules of an object with the given tags.
- [`WithoutTags`](/api/Sandbox.SceneTrace/WithoutTags): Only return entities without any of these tags
- [`WithTag`](/api/Sandbox.SceneTrace/WithTag): 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).
