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 :(
#Help with projectile synchronization
1 messages · Page 1 of 1 (latest)
@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"
The current setup doesn’t work?
no look
sory my potato laptop from 2012 cant record but i can take screenshot very quickly
as u see client infront and serve rbehind :/
If you remove the code would it be the same or not
which one?
my correction function has 2 modes type thing going 1 where it just hardsets to the currentposition based on time and velocity
The code responsible for correcting the position based on time
2 where it creates a velocity such that it reaches the correct trajectory
either one i do both dont work they both end up having the server lagging behind the client lol
How far is the server from the client
I know
ya but like i dont want ppl getting confused
like client curve dips first then sever when it should be togerther 😔
its fine at the start but gradually it gets worser and worer
Did you try it without the “correction’
like just dirrectly connect to loop?
ok ill try that after i eat
but y correction no work tho
sorry which one??
hopefully this explains what u need* if not i can explain
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
Tbh I don’t think I’m qualified for this syncing stuff
😔
@plain plank how did u do ur netcode rollback???