playMaker

Author Topic: Play effect at stored hit point  (Read 944 times)

wirejaw

  • Playmaker Newbie
  • *
  • Posts: 49
Play effect at stored hit point
« 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?

...

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
Re: Play effect at stored hit point
« Reply #1 on: May 07, 2022, 06:58:58 AM »
Instantiate a prefab with a particle system that plays at awake on hit point?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Play effect at stored hit point
« Reply #2 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.