#Help with projectile synchronization

1 messages · Page 1 of 1 (latest)

quartz copper
#

Following is the code that attempts to synchronize projectile between client and server, the way this goes about is client instantly shoots their projectile tells the server and server (poorly)attempts to synchronize it works initially?* but something creates a horrible desynchrony down the line of the trajectory... pls help :(

#

@weary juniper

#

Oh following is :ConnectLoop() function

#

i dont think this is relevant tho

#

maybe i should try and combine :ConnectLoop and CorrectionLoop

#

could be the cause or somnting

#

HERE IS THE FULL IMAGE ALONG WITH THE BLOCK FROM LINE "if (correctAt_Position - self.__CurrentPosition).Magnitude <= Projectile.SETTINGS.RollbackTolerance then"

weary juniper
#

The current setup doesn’t work?

quartz copper
#

sory my potato laptop from 2012 cant record but i can take screenshot very quickly

#

as u see client infront and serve rbehind :/

weary juniper
#

If you remove the code would it be the same or not

quartz copper
#

my correction function has 2 modes type thing going 1 where it just hardsets to the currentposition based on time and velocity

weary juniper
#

The code responsible for correcting the position based on time

quartz copper
#

2 where it creates a velocity such that it reaches the correct trajectory

quartz copper
quartz copper
#

THIS IS A CURVE its not going straight

weary juniper
#

How far is the server from the client

weary juniper
quartz copper
#

like client curve dips first then sever when it should be togerther 😔

quartz copper
weary juniper
#

Did you try it without the “correction’

quartz copper
#

ok ill try that after i eat

#

but y correction no work tho

weary juniper
#

Elaborate on the variables

#

Their confusing 🫤

quartz copper
#

hopefully this explains what u need* if not i can explain

weary juniper
#

Goal position at time stuff

quartz copper
# weary juniper Goal position at time stuff

this is for when they first shoot

GoalPosition_AtTime = position of the rocket when it was first shot 

timeAt_GoalPosition = time at which the rocket was shot at

velocityAt_GoalPosition = velocity at which the rocket was shot at (direction * speed) :: Vector3

hardset = basically if u want to tp the projectile to current position or have it eventually reach the same trajectory```
#

hopefully that explains it??

#

basically,


timeAt_GoalPosition is the time at that particular position

velocityAt_GoalPosition is the velocity at that particular position as vector3

hardset = basically if u want to tp the projectile to current position or have it eventually reach the same trajectory```
#

sorry if it is confusing i can see why

weary juniper
#

Tbh I don’t think I’m qualified for this syncing stuff

quartz copper
#

@plain plank how did u do ur netcode rollback???