Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wirejaw on May 06, 2022, 03:11:12 PM

Title: Play effect at stored hit point
Post by: wirejaw on May 06, 2022, 03:11:12 PM
I want to play an impact effect when my player attacks things with a sword.  I have a raycast (using Raycast 2) working fine, shooting out from my player object in the correct direction and the correct distance, and I'm using Store Hit Point to store the point of impact variable.  The position is registering fine, but I can't figure out how to generate a prefab effect at that exact point for each hit.  Any tips?
Title: Re: Play effect at stored hit point
Post by: ... on May 07, 2022, 06:58:58 AM
Instantiate a prefab with a particle system that plays at awake on hit point?
Title: Re: Play effect at stored hit point
Post by: djaydino on May 07, 2022, 10:03:23 AM
Hi.
Probably best to use some pool system.
Then as FPS mentioned spawn a prefab with the particle system that is set to play on awake.

set it Not to loop and use the Particle System Alive action to see when its done, then despawn.