Combat system help

Just a quick question does it matter if you use raycast or a .touched event for dealing damage i am using a .touched event right now with a custom hitbox and i have no problems but im just wondering if raycast would be better.

1 Like

It would be better, but not for performance in general, which ever is easiest and best fit for your case, do it.

2 Likes

Will do thank you for your feedback!

1 Like

It really just depends on what you’re planning to do with that combat system.
If it’s just going to be “get hit = lose HP” then yeah a .touched event is just fine.
But if you’re going the “get hit = lose HP and body part (sometimes)” way then you should use raycasts for more precision.

1 Like