Table of Contents

Class CollisionEventData

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Event data for a hit, carrying where in the world the impact happened.

public class CollisionEventData : EventData
Inheritance
CollisionEventData
Derived
Inherited Members

Remarks

This used to carry Unity's Collision. Nothing produces one any more: an ability object resolves its hits with an explicit swept query (AbilityObjectSweep) so they can be lag compensated, and an area effect never had a contact to report in the first place — so the field was null on every path that survived and PlayFXAction dereferenced it regardless. A point and a normal are all any consumer read out of it.

Constructors

CollisionEventData(ICharacter)

Creates event data for a hit with no single impact point.

public CollisionEventData(ICharacter initiator)

Parameters

initiator ICharacter

The character initiating the event.

CollisionEventData(ICharacter, Vector3, Vector3)

Creates event data for a hit at a known point.

public CollisionEventData(ICharacter initiator, Vector3 hitPoint, Vector3 hitNormal)

Parameters

initiator ICharacter

The character initiating the event.

hitPoint Vector3

World point of impact.

hitNormal Vector3

Surface normal at the impact.

Properties

HasHitPoint

True when this event knows where the impact was.

public bool HasHitPoint { get; }

Property Value

bool

Remarks

False for a hit that has no single point — an area effect resolves a whole overlap at once — so a consumer can fall back rather than place an effect at the world origin.

HitNormal

Surface normal at HitPoint. Only meaningful when HasHitPoint is true.

public Vector3 HitNormal { get; }

Property Value

Vector3

HitPoint

World point of impact. Only meaningful when HasHitPoint is true.

public Vector3 HitPoint { get; }

Property Value

Vector3