struct SceneTraceResult

book_4_sparkGenerated
code_blocksInput

Description

The SceneTraceResult struct in the Sandbox namespace provides detailed information about the result of a scene trace operation. It includes data about the trace's start and end positions, whether it hit an object, and details about the object hit, if any.

Members

Static Methods

Member NameSummary
FromCreates a SceneTraceResult from a Scene and a PhysicsTraceResult.
FromCreates a SceneTraceResult from a Scene and a MeshTraceRequest.Result.

Instance Fields

Member NameSummary
SceneThe scene in which the trace was performed.
HitWhether the trace hit something or not.
StartedSolidWhether the trace started in a solid.
StartPositionThe start position of the trace.
EndPositionThe end or hit position of the trace.
HitPositionThe hit position of the trace.
NormalThe hit surface normal (direction vector).
FractionA fraction [0..1] of where the trace hit between the start and the original end positions.
GameObjectThe GameObject that was hit.
ComponentThe Component that was hit.
BodyThe physics object that was hit, if any.
ShapeThe physics shape that was hit, if any.
SurfaceThe physical properties of the hit surface.
BoneThe id of the hit bone (either from hitbox or physics shape).
DirectionThe direction of the trace ray.
TriangleThe triangle index hit, if we hit a mesh physics shape.
TagsThe tags that the hit shape had.
HitboxThe hitbox that we hit.

Instance Properties

Member NameSummary
DistanceThe distance between start and end positions.