SceneTraceclass

objectSceneTrace
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.SceneTrace

Methods53

Showing 53 methods

public Sandbox.SceneTrace Radius(float radius)PUBLIC

Makes this trace a sphere of given radius.

ParameterTypeDescription
radiusfloat
Returns:SceneTrace

public Sandbox.SceneTrace Rotated(Rotation rotation)PUBLIC

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

ParameterTypeDescription
rotationRotation
Returns:SceneTrace

public System.Collections.Generic.IEnumerable`1<Sandbox.SceneTraceResult> RunAll()PUBLIC

Run the trace and record everything we hit along the way. The result will be an array of hits.

Returns:IEnumerable<SceneTraceResult>

public Sandbox.SceneTrace UseHitboxes(bool hit = True)PUBLIC

Should we hit hitboxes

ParameterTypeDescription
hit = Truebool
Returns:SceneTrace

public Sandbox.SceneTrace UseHitPosition(bool enabled = True)PUBLIC

Should we compute hit position.

ParameterTypeDescription
enabled = Truebool
Returns:SceneTrace

public Sandbox.SceneTrace UsePhysicsWorld(bool hit = True)PUBLIC

Should we hit physics objects?

ParameterTypeDescription
hit = Truebool
Returns:SceneTrace

public Sandbox.SceneTrace WithTag(string tag)PUBLIC

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

ParameterTypeDescription
tagstring
Returns: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 Cone(System.Single height, System.Single baseRadius, Ray ray, System.Single distance)public Sandbox.SceneTrace Cone(System.Single height, System.Single baseRadius, Vector3 from, Vector3 to)public Sandbox.SceneTrace Cone(System.Single height, System.Single baseRadius)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