Skip to content

Commit

Permalink
Merge pull request #60584 from lawnjelly/fti_invisible_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Apr 28, 2022
2 parents 4cfc96f + 49eaa7b commit 59e84be
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scene/3d/visual_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,16 @@ void VisualInstance::_notification(int p_what) {

} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
if (_is_vi_visible()) {
if (_is_vi_visible() || is_physics_interpolated_and_enabled()) {
if (!_is_using_identity_transform()) {
Transform gt = get_global_transform();
VisualServer::get_singleton()->instance_set_transform(instance, gt);
}
}
} break;
case NOTIFICATION_RESET_PHYSICS_INTERPOLATION: {
if (_is_vi_visible()) {
if (is_physics_interpolated()) {
VisualServer::get_singleton()->instance_reset_physics_interpolation(instance);
}
if (_is_vi_visible() && is_physics_interpolated()) {
VisualServer::get_singleton()->instance_reset_physics_interpolation(instance);
}
} break;
case NOTIFICATION_EXIT_WORLD: {
Expand Down

0 comments on commit 59e84be

Please sign in to comment.