Table of Contents

Class PlayFXAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Action that plays a visual effect (FX) at a determined position, typically at the point of collision or interaction.

[Serializable]
public class PlayFXAction : BaseAction, IAction
Inheritance
PlayFXAction
Implements
Inherited Members

Fields

FXPrefab

The FX prefab to play when this action is executed.

[Tooltip("The FX prefab to play.")]
public GameObject FXPrefab

Field Value

GameObject

Methods

Execute(ICharacter, EventData)

Plays the FX prefab at the collision or interaction location.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

The event data containing collision or interaction information.

Remarks

The FX is spawned at the hit point a CollisionEventData carries, falling back to the target's position, then the initiator's, then the world origin.

It used to read Collision.contacts[0]. That threw as soon as anything dispatched a hit without a Unity collision — AbilityApplyAreaAction always did, and now every ability hit does, because AbilityObject resolves them with a swept query so they can be lag compensated. The event carries the impact point directly instead.

VFX instantiation is suppressed during prediction replay ticks to prevent visual spam.