Table of Contents

Struct AbilitySweepHit

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

One collider the swept query found, with the impact information a hit needs.

public readonly struct AbilitySweepHit
Inherited Members

Constructors

AbilitySweepHit(Collider, Vector3, Vector3, float, Vector3)

public AbilitySweepHit(Collider collider, Vector3 point, Vector3 normal, float distance, Vector3 localPoint)

Parameters

collider Collider
point Vector3
normal Vector3
distance float
localPoint Vector3

Fields

Collider

The collider that was hit.

public readonly Collider Collider

Field Value

Collider

Distance

Distance along the swept segment, zero for a collider already overlapping at the start.

public readonly float Distance

Field Value

float

LocalPoint

Point expressed in the hit BODY's own space, captured while the query's world was still standing.

public readonly Vector3 LocalPoint

Field Value

Vector3

Remarks

The only impact position that survives leaving the rewind scope. AbilityObject.ResolveSweptHits queries inside a rewind to the caster's view and then dispatches the results after it has closed — deliberately, so no damage or authored action ever runs against a displaced world. Point therefore describes a world that no longer exists by the time anything reads it, and comparing it against anything read from a live transform mixes the two. At 200 ms that is metres.

A LOCAL point has no such problem, because the body and everything defined relative to it were displaced together: the relationship is identical in the rewound world and the live one. That is what lets ShieldVolume be tested against a hit long after the scope has closed. Zero when the hit resolved to no body.

Normal

Surface normal at Point, or the reverse of travel for an overlap.

public readonly Vector3 Normal

Field Value

Vector3

Point

World point of impact, for effects that need one.

public readonly Vector3 Point

Field Value

Vector3