The EndPosition
field represents the final position of a physics trace in the PhysicsTraceResult
structure. This position is either where the trace ended or where it hit an object.
The EndPosition
field represents the final position of a physics trace in the PhysicsTraceResult
structure. This position is either where the trace ended or where it hit an object.
Use the EndPosition
field to determine the exact location where a physics trace operation concluded. This can be useful for understanding the result of a trace, such as determining where a projectile would land or where a raycast hit an object.
// Example of using PhysicsTraceResult.EndPosition PhysicsTraceResult traceResult = PerformPhysicsTrace(); if (traceResult.Hit) { Vector3 hitLocation = traceResult.EndPosition; // Use hitLocation for further processing, such as spawning effects or calculating impact }