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
When using the NetworkTransform's interpolate method and a default TickRate of 30, interpolated objects often feel very floaty near places of sharp velocity changes especially in jumping. When interpolation is off, the positions are perfect, but obviously the appearance is very jittery since they are only updated once per network Tick.
The second lerp attempts to lerp the current position to the target point (which is correctly lerping between positions). This makes the actual transform essentially ease-out as it approaches it's target, but never really reach it. Especially since the speed of this second lerp is attempting to travel the distance with a function of delta time rather than a function which spans 0-1.
If the variable names are correct, it would attempt to close the gap in a maximum of 0.1s, however that is much slower than the tick rate, and each time the target moves, the gap increases, keeping it constantly lagging behind.
Removing this line, or adjusting the speed of the second lerp provides the desired effect.
This floatiness and asymptotic nature of the second lerp causes issues with animations, being grounded, and the overall shape of how that network objects travels with respect to how the actual object moved.
There is another other method on this interpolator to control the interpolation, and I would expect to be able to configure this part of that interpolator as well.
I would expect either that the interpolators are protected so that any class extending network transform can adjust these parameters, or a public method much like SetMaxInterpolationBound for me to set MaximumInterpolationTime
Screenshots
Unavailable.
Environment
Not relevant.
Additional Context
The text was updated successfully, but these errors were encountered:
Description
When using the NetworkTransform's interpolate method and a default TickRate of 30, interpolated objects often feel very floaty near places of sharp velocity changes especially in jumping. When interpolation is off, the positions are perfect, but obviously the appearance is very jittery since they are only updated once per network Tick.
The problem is this line of code:
https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/blob/ngo/2.0.0/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs?fbclid=IwZXh0bgNhZW0CMTEAAR3FptsALIU67nKy8jIypEUz-_vmczp3IqjiKbxfamMQc1ZB4euxKrt3Wqk_aem_krAd3QtlotTmGgwAH7PxXg#L239
The second lerp attempts to lerp the current position to the target point (which is correctly lerping between positions). This makes the actual transform essentially ease-out as it approaches it's target, but never really reach it. Especially since the speed of this second lerp is attempting to travel the distance with a function of delta time rather than a function which spans 0-1.
If the variable names are correct, it would attempt to close the gap in a maximum of 0.1s, however that is much slower than the tick rate, and each time the target moves, the gap increases, keeping it constantly lagging behind.
Removing this line, or adjusting the speed of the second lerp provides the desired effect.
This floatiness and asymptotic nature of the second lerp causes issues with animations, being grounded, and the overall shape of how that network objects travels with respect to how the actual object moved.
Actual Outcome
The interpolators are marked private, and I am unable to tweak this public parameter
Expected Outcome
There is another other method on this interpolator to control the interpolation, and I would expect to be able to configure this part of that interpolator as well.
I would expect either that the interpolators are protected so that any class extending network transform can adjust these parameters, or a public method much like
SetMaxInterpolationBound
for me to setMaximumInterpolationTime
Screenshots
Unavailable.
Environment
Not relevant.
Additional Context
The text was updated successfully, but these errors were encountered: