I’ve been having an issue where whenever I clone a bullet on the server, add a bodyvelocity and then parent it, it always delays. It looks really stupid and I’ve been wondering how @EtiTheSprirt’s FastCast gets past this?
I have no issues with raycasting delay or anything else. I just notice that using cosmetic bullets on the server is very unstable and unreliable.
I haven’t dug much into FastCast, although I’m guessing what happens is that there’s a client-sided replication of the bullet so it’s immediate when the player fires their gun, and if I could take a guess, it creates a bullet for every other client in the game from the server. Then I believe the server handles raycasting to actually deal damage in a secure manner.
FastCast actually uses raycasting entirely to create an illusion of a bullet moving with velocity; it’s pretty clever.
Interesting. But how would you calculate the path and visuals of tons of other bullets? It seems like it can be very lag inducing. I also only see that it clones a single bullet instead of multiple like you say it might.
I’ve also noticed that the bullet from other’s screen is rather far from the muzzle, which could mean that he waits a bit to parent the bullet.
I’d recommend replicating the bullets to the client. The only delay will be the ping (a little more for execution and security). It allows way smoother movement for physics and doesn’t use the server to replicate it. What you are probably experiencing is the unanchored part moving in between network owners?
It might be far from the muzzle due to the delay it takes for the client to fire a remote to the server, then for the server to fire all clients to draw a bullet.
And raycasting is generally very lightweight to use, making it extremely efficient to use in weapon systems.
I normally would create the bullet on the client, because there is no delay. SO you’re saying the only delay comes from the ping? I am creating the bullet from a remote event when I do it on the server, but it still looks bad.