s&box docs

public sealed struct Sandbox.SceneTrace

Methods

Showing 50 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 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.

public Sandbox.SceneTrace Rotated(Rotation rotation)

Makes this a rotated trace, for tracing rotated boxes and capsules.

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

Parameters

  • hit: Default: True

public Sandbox.SceneTrace UseHitPosition(bool enabled = True)

Should we compute hit position.

Parameters

  • enabled: Default: True

public Sandbox.SceneTrace UsePhysicsWorld(bool hit = True)

Should we hit physics objects?

Parameters

  • hit: Default: True

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).

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.SceneTrace

On this page

Methodspublic Sandbox.SceneTrace Body(Sandbox.PhysicsBody body, Transform from, Vector3 to)public Sandbox.SceneTrace Body(Sandbox.PhysicsBody body, Vector3 to)public Sandbox.SceneTrace Body(Sandbox.Rigidbody body, Vector3 to)public Sandbox.SceneTrace Box(BBox bbox, Ray ray, System.Single distance)public Sandbox.SceneTrace Box(BBox bbox, Vector3 from, Vector3 to)public Sandbox.SceneTrace Box(Vector3 extents, Ray ray, System.Single distance)public Sandbox.SceneTrace Box(Vector3 extents, Vector3 from, Vector3 to)public Sandbox.SceneTrace Capsule(Capsule capsule, Ray ray, System.Single distance)public Sandbox.SceneTrace Capsule(Capsule capsule, Vector3 from, Vector3 to)public Sandbox.SceneTrace Capsule(Capsule capsule)public Sandbox.SceneTrace Cylinder(System.Single height, System.Single radius, Ray ray, System.Single distance)public Sandbox.SceneTrace Cylinder(System.Single height, System.Single radius, Vector3 from, Vector3 to)public Sandbox.SceneTrace Cylinder(System.Single height, System.Single radius)public Sandbox.SceneTrace FromTo(Transform from, Vector3 to)public Sandbox.SceneTrace FromTo(Vector3 from, Vector3 to)public Sandbox.SceneTrace HitTriggers()public Sandbox.SceneTrace HitTriggersOnly()public Sandbox.SceneTrace IgnoreDynamic()public Sandbox.SceneTrace IgnoreGameObject(Sandbox.GameObject obj)public Sandbox.SceneTrace IgnoreGameObjectHierarchy(Sandbox.GameObject obj)public Sandbox.SceneTrace IgnoreKeyframed()public Sandbox.SceneTrace IgnoreStatic()public Sandbox.SceneTrace Radius(System.Single radius)public Sandbox.SceneTrace Ray(Ray ray, System.Single distance)public Sandbox.SceneTrace Ray(Vector3 from, Vector3 to)public Sandbox.SceneTrace Rotated(Rotation rotation)public Sandbox.SceneTraceResult Run()public System.Collections.Generic.IEnumerable`1<Sandbox.SceneTraceResult> RunAll()public Sandbox.SceneTrace Size(BBox hull)public Sandbox.SceneTrace Size(Vector3 mins, Vector3 maxs)public Sandbox.SceneTrace Size(Vector3 size)public Sandbox.SceneTrace Sphere(System.Single radius, Ray ray, System.Single distance)public Sandbox.SceneTrace Sphere(System.Single radius, Vector3 from, Vector3 to)public Sandbox.SceneTrace Sweep(Sandbox.PhysicsBody body, Transform from, Transform to)public Sandbox.SceneTrace Sweep(Sandbox.PhysicsBody body, Transform to)public Sandbox.SceneTrace Sweep(Sandbox.Rigidbody body, Transform from, Transform to)public Sandbox.SceneTrace UseHitboxes(System.Boolean hit = True)public Sandbox.SceneTrace UseHitPosition(System.Boolean enabled = True)public Sandbox.SceneTrace UsePhysicsWorld(System.Boolean hit = True)public Sandbox.SceneTrace UseRenderMeshes(System.Boolean hitFront, System.Boolean hitBack)public Sandbox.SceneTrace UseRenderMeshes(System.Boolean hit = True)public Sandbox.SceneTrace WithAllTags(Sandbox.ITagSet tags)public Sandbox.SceneTrace WithAllTags(System.String[] tags)public Sandbox.SceneTrace WithAnyTags(Sandbox.ITagSet tags)public Sandbox.SceneTrace WithAnyTags(System.String[] tags)public Sandbox.SceneTrace WithCollisionRules(System.Collections.Generic.IEnumerable`1<System.String> tags, System.Boolean asTrigger = False)public Sandbox.SceneTrace WithCollisionRules(System.String tag, System.Boolean asTrigger = False)public Sandbox.SceneTrace WithoutTags(Sandbox.ITagSet tags)public Sandbox.SceneTrace WithoutTags(System.String[] tags)public Sandbox.SceneTrace WithTag(System.String tag)Metadata