Description
The Bone
property of the PhysicsTraceResult
struct represents the identifier of the bone that was hit during a physics trace. This identifier can originate from either a hitbox or a physics shape, providing a way to determine which specific bone was impacted in a collision or trace event.
Usage
Use the Bone
property to retrieve the ID of the bone that was hit in a physics trace. This can be useful for determining specific interactions with skeletal models or for applying effects to specific parts of a model based on the bone that was hit.
Example
// Example of using the Bone property
PhysicsTraceResult traceResult = PerformPhysicsTrace();
if (traceResult.Hit)
{
int hitBoneId = traceResult.Bone;
// Use hitBoneId to apply logic specific to the bone that was hit
// For example, apply damage to a specific bone or trigger an animation
}