struct PhysicsTraceResult

robot_2Generated
code_blocksInput

Description

The PhysicsTraceResult struct in the Sandbox namespace provides detailed information about the result of a physics trace operation. It includes data about the hit object, the position and direction of the trace, and other relevant details.

Members

Fields

Member NameSummary
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
BodyThe physics object that was hit, if any
ShapeThe physics shape that was hit, if any
SurfaceThe physical properties of the hit surface
DirectionThe direction of the trace ray
TriangleThe triangle index hit, if we hit a mesh physics shape
TagsThe tags that the hit shape had

Properties

Member NameSummary
BoneThe id of the hit bone (either from hitbox or physics shape)
DistanceThe distance between start and end positions.