struct PhysicsTraceResult

book_4_sparkGenerated
code_blocksInput

Description

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

Members

Fields

Member Name Summary
Hit Whether the trace hit something or not
StartedSolid Whether the trace started in a solid
StartPosition The start position of the trace
EndPosition The end or hit position of the trace
HitPosition The hit position of the trace
Normal The hit surface normal (direction vector)
Fraction A fraction [0..1] of where the trace hit between the start and the original end positions
Body The physics object that was hit, if any
Shape The physics shape that was hit, if any
Surface The physical properties of the hit surface
Direction The direction of the trace ray
Triangle The triangle index hit, if we hit a mesh physics shape
Tags The tags that the hit shape had

Properties

Member Name Summary
Bone The id of the hit bone (either from hitbox or physics shape)
Distance The distance between start and end positions.