How does an VFX deal damage when it hits an enemy?

Hello everyone, I’m wondering something. I’m thinking of making a skill as it appears in the video. The first hit deals damage because the sword touches it. But I want it to be damaged as much as there are cuts when vfx hits it. So I’m wondering how to do damage even with different vfx. How can I do that?

Thanks,

A lot of ways you could do it. One way I have in mind for this particular vfx is sphere trace. Because this vfx is ranged based damage system, then sphere trace is a good start.

If your vfx is a projectile type, I recommend using an actor class that inherits the projectile component. Then you can add the sphere collision around the projectile and spawn it the same as you do with bullets.

If you have no idea what I meant, then I would recommend you read this:

Thanks for reply and yes i thought i could do it using traces. As seen in the vfx in the video, the more the blade cuts touch the enemy, the more damage I want to inflict. I’m wondering how to do this. :confused:

I don’t think that is an efficient way to do it cause it will increase the complexity and somehow will affect the performance. You can observe the AAA studio avoid doing this in the DMC game series for example.

A better approach that I have in mind is damage over the distance. The closer the enemy is to the player, the higher the damage or at least the closest to the VFX’s location. You can also change it to the number of cuts over distance. Or simply within-range damage functionality, whatever is in the range of the VFX will get damaged.

The setup should be simple and straightforward.