Help with combat system

I want to do a combat system.

I don’t know whats the best way to detect hits, I wanted to try ray casting, but idk if I should use it for a combat system.

1 Like

It depends on what type of combat system you’re thinking of really. The post is a bit vague as to what you want to do in terms of a combat system. Raycast can be useful in its own regards. An example would be making it so a punch will hurt someone if the thing you’re trying to punch is close enough, you can do that with Raycasting. Another obvious example are guns, they require Raycasting

I just want a combat system, to be like a naruto themed combat system, sobasically quick combos, attacks like rasengan and things like that

Something like that will be fairly advanced to make as that will require a lot of animating, coding for the combos and conditions to check if you can use this ability, etc. I don’t believe Raycasting will help in this regard besides the punching and kicking, as the other moves that use a projectile will require using the Touched event to detect if something other than yourself hit the projectile and do something.

I’m not that experienced with something like this so I’m not sure if I’m giving the right advice

Made a post before on this

EDIT: Also would like to add this to my post that the best way to actually detecting hits would be Region3 around the player (one i have done personally) or magnitude checking to see if player is in the vicinity of the other player.

Detecting combo’s should be done with the client sending in input information to the server where, lets for say this was a mouse click combat system then you would go about recording input clicks such as “LLLR” If a player successively does these clicks (keep in mind this check should be done server side) then it can initiate a combo