s&box docs

public sealed struct Sandbox.PhysicsTraceBuilder

Methods

Showing 46 methods

public Sandbox.PhysicsTraceBuilder Radius(float radius)

Makes this trace a sphere of given radius.

public Sandbox.PhysicsTraceResult Run()

Run the trace and return the result. The result will return the first hit.

public Sandbox.PhysicsTraceResult RunAgainstBBox(BBox box, Transform transform)

Traces only against the given bounding box at the specified transform.

Parameters

  • box: The bounding box to test against.
  • transform: Transform applied to the box.

Returns

The trace result.

public Sandbox.PhysicsTraceResult RunAgainstCapsule(Capsule capsule, Transform transform)

Traces only against the given capsule at the specified transform.

Parameters

  • capsule: The capsule to test against.
  • transform: Transform applied to the capsule.

Returns

The trace result.

public Sandbox.PhysicsTraceResult RunAgainstSphere(Sandbox.Sphere sphere, Transform transform)

Traces only against the given sphere at the specified transform.

Parameters

  • sphere: The sphere to test against.
  • transform: Transform applied to the sphere.

Returns

The trace result.

public Sandbox.PhysicsTraceResult[] RunAll()

Run the trace and return all hits as a result.

public Sandbox.PhysicsTraceBuilder UseHitPosition(bool enabled = True)

Compute hit position.

Parameters

  • enabled: Default: True

public Sandbox.PhysicsTraceBuilder WithTag(Sandbox.StringToken ident)

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

On this page

Methodspublic Sandbox.PhysicsTraceBuilder Body(Sandbox.PhysicsBody body, Transform from, Vector3 to)public Sandbox.PhysicsTraceBuilder Body(Sandbox.PhysicsBody body, Vector3 to)public Sandbox.PhysicsTraceBuilder Box(BBox bbox, Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Box(BBox bbox, Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Box(Vector3 extents, Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Box(Vector3 extents, Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Capsule(Capsule capsule, Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Capsule(Capsule capsule, Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Capsule(Capsule capsule)public Sandbox.PhysicsTraceBuilder Cylinder(System.Single height, System.Single radius, Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Cylinder(System.Single height, System.Single radius, Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Cylinder(System.Single height, System.Single radius)public Sandbox.PhysicsTraceBuilder FromTo(Transform from, Vector3 to)public Sandbox.PhysicsTraceBuilder FromTo(Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder HitTriggers()public Sandbox.PhysicsTraceBuilder HitTriggersOnly()public Sandbox.PhysicsTraceBuilder IgnoreDynamic()public Sandbox.PhysicsTraceBuilder IgnoreKeyframed()public Sandbox.PhysicsTraceBuilder IgnoreStatic()public Sandbox.PhysicsTraceBuilder Radius(System.Single radius)public Sandbox.PhysicsTraceBuilder Ray(Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Ray(Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Rotated(Rotation rotation)public Sandbox.PhysicsTraceResult Run()public Sandbox.PhysicsTraceResult RunAgainstBBox(BBox box, Transform transform)public Sandbox.PhysicsTraceResult RunAgainstCapsule(Capsule capsule, Transform transform)public Sandbox.PhysicsTraceResult RunAgainstSphere(Sandbox.Sphere sphere, Transform transform)public Sandbox.PhysicsTraceResult[] RunAll()public Sandbox.PhysicsTraceBuilder Size(BBox hull)public Sandbox.PhysicsTraceBuilder Size(Vector3 mins, Vector3 maxs)public Sandbox.PhysicsTraceBuilder Size(Vector3 size)public Sandbox.PhysicsTraceBuilder Sphere(System.Single radius, Ray ray, System.Single distance)public Sandbox.PhysicsTraceBuilder Sphere(System.Single radius, Vector3 from, Vector3 to)public Sandbox.PhysicsTraceBuilder Sweep(Sandbox.PhysicsBody body, Transform from, Transform to)public Sandbox.PhysicsTraceBuilder Sweep(Sandbox.PhysicsBody body, Transform to)public Sandbox.PhysicsTraceBuilder UseHitPosition(System.Boolean enabled = True)public Sandbox.PhysicsTraceBuilder WithAllTags(Sandbox.ITagSet tags)public Sandbox.PhysicsTraceBuilder WithAllTags(System.String[] tags)public Sandbox.PhysicsTraceBuilder WithAnyTags(Sandbox.ITagSet tags)public Sandbox.PhysicsTraceBuilder WithAnyTags(System.String[] tags)public Sandbox.PhysicsTraceBuilder WithCollisionRules(System.Collections.Generic.IEnumerable`1<System.String> tags, System.Boolean asTrigger = False)public Sandbox.PhysicsTraceBuilder WithCollisionRules(System.String tag, System.Boolean asTrigger = False)public Sandbox.PhysicsTraceBuilder WithoutTag(Sandbox.StringToken tag)public Sandbox.PhysicsTraceBuilder WithoutTags(Sandbox.ITagSet tags)public Sandbox.PhysicsTraceBuilder WithoutTags(System.String[] tags)public Sandbox.PhysicsTraceBuilder WithTag(Sandbox.StringToken ident)Metadata