Sixze / ALS-Refactored

Completely reworked and improved C++ version of Advanced Locomotion System V4.
MIT License
943 stars 261 forks source link

Discrepancy in actor forward direction between client and server while aiming and rotating in place #535

Closed jomath229 closed 1 month ago

jomath229 commented 1 month ago

Discrepancy possible between server and client with rotate in place while in aiming mode. It is possible for the character on the server to not have the same orientation from the client. Since the rotation becomes driven by animation from the rotate in place anims and they get smoothed out with lerps etc., they can eventually fall out of sync and not have the same body orientation.

I implemented some proning logic and when implementing some collision depenetration, I realised the character's rotation on the server was out of sync since some rubberbanding occured on the client when some depenetration was detected from the body orientation which was different on the server, where the body orientation wasn't in a wall yet.

From what I see, it seems like actor forward direction between server and client can get out of sync while aiming and rotating in place, but it's hard to notice since it evens out when you start moving, but I've managed from jerking left to right to have a good 40/50 degrees of difference on the character orientation between both the client and the server, to the point that the client character started to rotate in place anim and the server character didn't rotate in place, leaving both of them at completely different rotations until you move again. Must I specify, I locked the rotation type to always be in aiming to follow a fortnish type of movement.