Back already! My goal today is to convert the scene’s VFX graph to a player-specific VFX graph. If I have five players in the scene, that means I’ll also have five VFX graphs. All the graphs will share the same SDF, but their individuality will allow me to generate different different particle effects for each player.

I used superposition to share particle spawn position between the left and right hands.

Next, I copied over all my scripts from Scene #4. It was time to add back my physics. I didn’t even bother reading my code. I just changed over the script names and corrected errors until physics were working again.

One side effect I’ve discovered with the shared SDF that didn’t cross my mind before is that particles will go to the spherical body nearest to each specific hand. That means if one player’s right hand is closer to another player’s body then its own, then particles from the right and left hand will go to different bodies. That doesn’t seem right to me.

I figured a way to fix this would be to shoot particles away from the hands toward the player’s own body. My theory was that if the velocity is strong enough, I could override the pull toward the neighboring player body.

The results are encouraging! However, I may need to augment this effect by disabling the pull of a hand that’s far enough away from its body.


Tags: unity vfx particles sdf physics gamedev