Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Hasuman on May 08, 2020, 03:03:45 PM
-
In my beat em up style game I want effects, prefabs of trails and particles and such, to spawn on the character's limbs during certain events. What's the best way to spawn these effects and align them to character bones? I'm trying to keep the character prefabs as clean as possible, so I don't want to attach anything to their armatures in the editor, only in runtime.
-
You could spawn them in runtime, then set parent them under the bone. However, you usually need game objects as bind/mount points for more control how they are placed. In this case the skeleton bones gets bind/mount points, and the effects are spawned as child of those.
You can also set this up separate from the skeleton hierarchy, and connect them using parent constraints (a standard unity component). Then, with playmaker, activate / enable the object when needed, while the particles are set to fire on awake. Particle play all is also useful action.
I tend to the second solution, because frequently used stuff is better turned on and off (as in pooling). However it should probably not matter, unless dozens of characters fire particles all the time.