πŸŽ†Visual Effects

How to add visual effects to characters via ODK components

The ODK uses the BPC_ODK_NiagaraEffectsManagerComponent to play local and replicated effects on characters. The BPMC_ODK_GucciTrailHandler is an example showing how we add and remove effects to characters that own a Koda pendant NFT.

Inside BPMC_ODK_GucciTrailHandler::TryApplyGucciTrailEffect, we use the BPC_ODK_NiagaraEffectsManagerComponent to add the Gucci Niagara visual effect to both characters feet using AddNiagaraEffect. It's parameters are as follows: Niagara System - The Niagara system to add. Socket - The socket on the character mesh to attach the Niagara system to. Relative Transform - The transform which should be applied to the Niagara system relative to the socket. This lets you offset/rotate or scale the visual effect in relatioin to the defined socket. Is Persistant Effect - If true, the visual effect will play continuously until removed. If false, the effect will run once and then be automatically removed. Replicate - Should the effect be visable to other players as well.

AddNiagaraEffect returns an Id for the effect that should be used when attempting to remove the visual effect. An example of this can be seen inside BPMC_ODK_GucciTrailHandler::RemoveGucciTrailEffect whereRemoveNiagaraEffect is called with the relevant EffectId.

Last updated