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 moving an interpolated node, if you hide it then later make visible, it will interpolate (streak) from the point at which it was made invisible, instead of matching the motion.
Steps to reproduce
Move an interpolated object continuously. Hide for a time, then make visible.
This is something @RPicster noticed while we were working on "beat invaders".
The minimal reproduction project confirms this is the case, the box should ideally be hidden as it moves back to the start then be reshown as it starts interpolating between 0 and 1.
An easy "fix" is to call reset_physics_interpolation() when unhiding nodes (either manually or adding this to core). However, this is not ideal because it will cause a subtle judder to a continuously moving object that is e.g. repeatedly shown and hidden.
The problem stems from my optimization in #45583 whereby set_transform() is not called to the VisualServer when objects are hidden, which saves a lot of processing for hidden objects. An obvious core fix is to disable this optimization for interpolated objects, so that the previous and current interpolated transforms still updated when hidden. This will cost some performance for a rare case, so I'll see if there's some way of reducing the cost of this.
The text was updated successfully, but these errors were encountered:
Godot version
3.5 beta 2 to 4
System information
All
Issue description
When moving an interpolated node, if you hide it then later make visible, it will interpolate (streak) from the point at which it was made invisible, instead of matching the motion.
Steps to reproduce
Move an interpolated object continuously. Hide for a time, then make visible.
Minimal reproduction project
InterpolationSimpleTest.zip
Discussion
This is something @RPicster noticed while we were working on "beat invaders".
The minimal reproduction project confirms this is the case, the box should ideally be hidden as it moves back to the start then be reshown as it starts interpolating between 0 and 1.
An easy "fix" is to call
reset_physics_interpolation()
when unhiding nodes (either manually or adding this to core). However, this is not ideal because it will cause a subtle judder to a continuously moving object that is e.g. repeatedly shown and hidden.The problem stems from my optimization in #45583 whereby
set_transform()
is not called to the VisualServer when objects are hidden, which saves a lot of processing for hidden objects. An obvious core fix is to disable this optimization for interpolated objects, so that the previous and current interpolated transforms still updated when hidden. This will cost some performance for a rare case, so I'll see if there's some way of reducing the cost of this.The text was updated successfully, but these errors were encountered: