How to manually generate FXLib collision event in some position in world?

I know that there is exist FXLib(xml table) for collisions effects (to spawn group of Audio Trigger + Particle Fx emitter)

materialeffects table

But since I use RayCast for hitting objects, there are no abbility to call collision effect from FXlib( since RayCast request to do not genereates any collisions)

Can we somehow to manually generate one of effect from FXlib (xml table) with c++ code ?

wow, that’s great, thanks petrocket, I will try that.

Hi @fluffy,

The way we generate material FX that use the FXLibs from c++ is like this:

IMaterialEffects* pMaterialEffects = gEnv->pMaterialEffects;
TMFXEffectId effectId = InvalidEffectId;
effectId = pMaterialEffects->GetEffectIdByName(fxLibName, effectName);
// Setup FX params
SMFXRunTimeEffectParams params;
params.angle = angleFloat;
params.pos = params.decalPos = positionVec3;
if (effectId != InvalidEffectId)
pMaterialEffects->ExecuteEffect(effectId, params);