I’m just wondering what method i should use to handle client sided projectiles.
Currently i have a function that spawns a projectile and makes a RunService.Heartbeat to move the projectile and raycast for collision.
Will this be performant with many projectiles active at once, or should i have a single Heartbeat that loops through every active projectile and handles each one?
between either using a heartbeat connection for every projectile and only having one connection but looping through them, i don’t think it makes a difference which one you choose(maybe im super wrong but they can’t be that much faster/slower)
for actually handling tons of projectiles though, you should prioritize doing less raycasts every frame(especially if the hitreg is done somewhere else, or if the projectile is “irrelevant” enough), for example: if projectiles are a certain distance away, then only raycast every 5 frames and interpolate the position between