#AnticipatedNetworkTransform & CharacterController seem to interfere with each other

1 messages · Page 1 of 1 (latest)

marble hornet
#

Hey, I integrated AnticipatedNetworkTransform, which has been working fine so far

My code: https://share.sidia.net/cmlp636y20002ag3dy3xitpym

Now trying to use CharacterController together with it seems to cause some problems though, I see that it is trying to smooth, then snap back my character in the OnReanticipate but the character controller seems to snap the character back to where it thinks it should be instead instantly

The result looks like the attached video. The sphere is the server state (_ghost in code), the character is client state. It only snaps to the server position fully once I release the input and FixedUpdate stops triggering, without the magnitude check it doesnt ever stop doing the ping-pong snapping

It only happens if i can get the server state stuck behind a corner and force the states apart like that
The code is basically the same as the example from Unity but with the character controller switched in instead of direct operations on transform, I am thinking about copying the AnticipatedNetworkTransform and rewriting it to instead interact with CharacterController directly

pearl citrus
#

Yea. the character controller will override the Transform. You should disable it on the remote players. You might need to disable it during reanticipation as well

marble hornet
pearl citrus
#

right Disable at the beginning of OnReanticipate() then renable at the end. I havent tested it but it should work