You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interpolated entities jitter when syncing Position and Rotation instead of Transform.
For Interpolated entities, network interpolation applies to Position and Rotation in Update. Avian sync happens in FixedUpdate. So if you don't manually extract the Position/Rotation and inject it into the Transform during PostUpdate, you don't get interpolation every frame. There is this guidance in the book and this code, but that will never work without putting RigidBodies on your Interpolated entities. I don't actually think it works if you do that either, but not 100% sure.
This can be resolved in 3d with this user code, ripped straight from avian.
Doing the above is incomplete, because there is a similar problem with using VisualInterpolation::<Transform>. If a Correction<Position> happens, it must be extracted to the Transform without getting overwritten by VisualInterpolation.
So the signature of the above system could be updated to have a query more like
But I think, as we discussed, you're right, that Correction should just happen in the fixed schedule and VisualInterpolation should be applied on top.
edit: After some further testing, the solution in this comment isn't even reliable. Seems like there is a system ordering inconsistency, where on some startups the correction gets overwritten by visinterp, but other startups it doesn't. Fun!
Interpolated
entities jitter when syncingPosition
andRotation
instead ofTransform
.For
Interpolated
entities, network interpolation applies toPosition
andRotation
inUpdate
. Avian sync happens inFixedUpdate
. So if you don't manually extract the Position/Rotation and inject it into the Transform duringPostUpdate
, you don't get interpolation every frame. There is this guidance in the book and this code, but that will never work without putting RigidBodies on your Interpolated entities. I don't actually think it works if you do that either, but not 100% sure.This can be resolved in 3d with this user code, ripped straight from avian.
The text was updated successfully, but these errors were encountered: