File tree 4 files changed +11
-4
lines changed
4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ void Camera2D::_notification(int p_what) {
300
300
// Force the limits etc. to update.
301
301
_interpolation_data.xform_curr = get_camera_transform ();
302
302
_interpolation_data.xform_prev = _interpolation_data.xform_curr ;
303
+ _update_process_callback ();
303
304
} break ;
304
305
305
306
case NOTIFICATION_SUSPENDED:
Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ void Camera3D::_notification(int p_what) {
230
230
if (is_inside_tree ()) {
231
231
_interpolation_data.xform_curr = get_global_transform ();
232
232
_interpolation_data.xform_prev = _interpolation_data.xform_curr ;
233
+ _update_process_mode ();
233
234
}
234
235
} break ;
235
236
Original file line number Diff line number Diff line change @@ -921,12 +921,12 @@ void Node::set_physics_interpolation_mode(PhysicsInterpolationMode p_mode) {
921
921
} break ;
922
922
}
923
923
924
- // If swapping from interpolated to non-interpolated, use this as an extra means to cause a reset.
925
- if (is_physics_interpolated () && !interpolate && is_inside_tree ()) {
924
+ _propagate_physics_interpolated (interpolate);
925
+
926
+ // Auto-reset on changing interpolation mode.
927
+ if (is_physics_interpolated () && is_inside_tree ()) {
926
928
propagate_notification (NOTIFICATION_RESET_PHYSICS_INTERPOLATION);
927
929
}
928
-
929
- _propagate_physics_interpolated (interpolate);
930
930
}
931
931
932
932
void Node::reset_physics_interpolation () {
Original file line number Diff line number Diff line change @@ -482,6 +482,11 @@ void SceneTree::set_physics_interpolation_enabled(bool p_enabled) {
482
482
483
483
_physics_interpolation_enabled = p_enabled;
484
484
RenderingServer::get_singleton ()->set_physics_interpolation_enabled (p_enabled);
485
+
486
+ // Perform an auto reset on the root node for convenience for the user.
487
+ if (root) {
488
+ root->reset_physics_interpolation ();
489
+ }
485
490
}
486
491
487
492
bool SceneTree::is_physics_interpolation_enabled () const {
You can’t perform that action at this time.
0 commit comments