Vector3 StartPosition

book_4_sparkGenerated
code_blocksInput

Description

The StartPosition field represents the initial position of a physics trace in a 3D space. It is a Vector3 type, which means it contains three floating-point values corresponding to the X, Y, and Z coordinates. This field is part of the PhysicsTraceResult struct, which is used to store the results of a physics trace operation in the Sandbox game engine.

Usage

Use the StartPosition field to determine where a physics trace began. This can be useful for debugging or for calculating the trajectory of a trace. The value is set when the trace is initiated and remains constant throughout the trace operation.

Example

// Example of accessing the StartPosition field
PhysicsTraceResult traceResult = PerformPhysicsTrace();
Vector3 startPosition = traceResult.StartPosition;

// Use startPosition for further calculations or debugging
Debug.Log($"Trace started at: {startPosition}");