Client-sided projectile, server-sided hit detection

I’m currently working on improving performance and one of the major issues is the server trying to manage collision of over 50 projectiles at once (In cases of a full 12 player server.)

My main question is: How would I go about making it so projectiles hits are detected if I don’t want the server to be handling collisions and such (Preferably without the risk of exploits.)

Everything from creating and moving the projectile to hitboxes and detecting hits are all managed in server scripts.

1 Like

Why don‘t you use raycasting or is there a reason you want to avoid that?

I would use FastCast, it’s really performant:

Tutorial:

3 Likes

They use velocities so they bounce and rebound and I’m trying to avoid letting the server handle the collision for that.
If only I was working on a shooter game, raycasts would be the go-to. :pensive:

I’m fairly sure you can simulate that using FastCast.

FastCast can calculate even after a projectile bounces? Never knew that.


This is my current system so far. It bounces, it detects, it breaks stuff, loop.

1 Like

I mean as in firing another cast after the projectile hits something to reflect it.

Also, I’ve read over a part of your post that says you’re creating the projectiles on the server, have you tried creating the visuals on the client?

I tried to do it once, it worked. After that, I was stuck on how to manage the hit detection. I tried FastCast once but didn’t know how to continue with it.
I’ll try the method of recasting every hit.

1 Like