struct SceneTrace

robot_2Generated
code_blocksInput

Description

The SceneTrace struct in the Sandbox namespace provides a comprehensive set of methods for performing various types of trace operations in a scene. These operations include casting shapes like spheres, boxes, capsules, and cylinders, as well as handling physics bodies and game objects. The struct is designed to facilitate collision detection and interaction within a 3D environment.

Members

Instance Members

Member Name Summary
Sphere Casts a sphere from point A to point B or from a given position and direction, up to a given distance.
Box Casts a box from point A to point B or from a given position and direction, up to a given distance.
Capsule Casts a capsule from point A to point B or from a given position and direction, up to a given distance.
Cylinder Casts a cylinder from point A to point B or from a given position and direction, up to a given distance.
Ray Casts a ray from point A to point B or from a given position and direction, up to a given distance.
Body Casts a PhysicsBody from its current position and rotation to a desired end point.
Sweep Sweeps each PhysicsShape of a given PhysicsBody and returns the closest collision.
FromTo Sets the start and end positions or transforms of the trace request.
Size Makes this trace an axis-aligned box of given size.
Rotated Makes this a rotated trace, for tracing rotated boxes and capsules.
Radius Makes this trace a sphere of given radius.
UseHitPosition Determines if the hit position should be computed.
UseHitboxes Determines if hitboxes should be hit.
UseRenderMeshes Determines if render meshes should be hit.
UsePhysicsWorld Determines if physics objects should be hit.
WithTag Only return entities with this tag.
WithAllTags Only return entities with all of these tags.
WithAnyTags Only return entities with any of these tags.
WithoutTags Only return entities without any of these tags.
WithCollisionRules Use the collision rules of an object with the given tags.
IgnoreGameObject Do not hit this object.
IgnoreGameObjectHierarchy Do not hit this object or its hierarchy.
HitTriggers Hit triggers.
HitTriggersOnly Hit only triggers.
IgnoreStatic Do not hit static objects.
IgnoreDynamic Do not hit dynamic objects.
IgnoreKeyframed Do not hit keyframed objects.
Run Run the trace and return the result. The result will return the first hit.
RunAll Run the trace and record everything hit along the way. The result will be an array of hits.

Fields

Member Name Summary
PhysicsTrace Represents the physics trace builder used in the scene trace operations.