Struct LagCompensatedQuery.CompensatedHit
One body a compensated query selected, with the impact information a hit needs.
public readonly struct LagCompensatedQuery.CompensatedHit
- Inherited Members
Remarks
Shared by the overlap and the ray so the two hit-resolving shapes hand their callers the same thing. Point and Normal are what an impact effect reads; both are measured inside the rewind scope and carried here, never recomputed afterwards from a transform that has since been restored.
Constructors
CompensatedHit(Collider, ICharacter, float, Vector3, Vector3, Vector3)
public CompensatedHit(Collider collider, ICharacter character, float distance, Vector3 point, Vector3 normal, Vector3 localPoint)
Parameters
colliderCollidercharacterICharacterdistancefloatpointVector3normalVector3localPointVector3
Fields
Character
The character that owns Collider, or null for scenery.
public readonly ICharacter Character
Field Value
Collider
The nearest collider on Character, or the bare collider hit.
public readonly Collider Collider
Field Value
- Collider
Distance
Distance from the query origin, measured in the rewound world.
public readonly float Distance
Field Value
LocalPoint
Point in the hit BODY's own space, captured inside the rewind scope.
public readonly Vector3 LocalPoint
Field Value
- Vector3
Remarks
The same field, for the same reason, as LocalPoint: a world point measured inside a rewind describes a world that is gone by the time the caller uses it, so anything compared against a live transform is comparing two different worlds. A local point is stable across the two because the body carried its own frame with it — which is what lets ShieldVolume be tested against a hit after the scope has closed.
Normal
Surface normal at Point for a ray; the reverse of the query direction for an overlap, which has no surface crossing to take one from.
public readonly Vector3 Normal
Field Value
- Vector3
Point
World point of impact.
public readonly Vector3 Point
Field Value
- Vector3