#Smooth projectiles

1 messages · Page 1 of 1 (latest)

lost hill
#

Hello chads, would any of you happen to know how to make smooth projectiles. Right now I am simulating a projectile on client, sending a remote to the server, then replicating it on all clients. When it starts lagging however, what I see vs what the server sees (or what everyone else sees) has a slight difference.

I have read about rollback netcode, and I know it rolls back to the server's position if the difference is too big. But for a projectile, if it snaps to the server position, it wouldn't look right because it wouldnt be firing from my HRP. Though it looks right from MY client, it doesn't look right on other clients.

An example with smooth projectiles is bedwars, and I've been dying to know how they do it.

If you've read all this, thank you very much. If you have a workaround to this, it would be much appreciated.

steep sphinx
lost hill
steep sphinx
#

how can there still be lag

#

how did you move your projectile?

#

like through loop or

#

runservice

#

or velocity

lost hill
#

Run Service

steep sphinx
#

huh

#

that’s weird

#

there won’t be lag

#

unless you move it in the servers too

lost hill
#

so my version and their version, will be slightly different

steep sphinx
#

so check if you did

lost hill
#

but the time to send the request to tell everyone else to replicate the projectile takes time, y'get what I mean?

#

so is there a workaround to this, at least make it less hacky

fair sand
#

maybe try spawning the projectile on other clients where it should actually be instead of always starting it from the gun (or whatever you shoot with)

so basically:
your client shoots > remote to server with exact time it was fired > server forwards that to everyone else. when other clients get it, they check how late they are (like 200ms) and fast-forward the projectile based on its speed and direction, so it starts already partway along its path. it technically won’t come from the gun on their screen, but you can hide that by fading it in or just not rendering the first few frames.

frigid mural
#

@lost hill Just simulate on server

#

Use body force