|
@@ -88,7 +88,9 @@ void VisualInstance3D::_notification(int p_what) {
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case NOTIFICATION_TRANSFORM_CHANGED: {
|
|
case NOTIFICATION_TRANSFORM_CHANGED: {
|
|
- // ToDo : Can we turn off notify transform for physics interpolated cases?
|
|
|
|
|
|
+ // NOTIFICATION normally turned off for physics interpolated cases (via
|
|
|
|
+ // `notify_transform_when_fti_off`), however derived classes can still turn this back on,
|
|
|
|
+ // so always wrap with is_physics_interpolation_enabled().
|
|
if (_is_vi_visible() && !(is_inside_tree() && get_tree()->is_physics_interpolation_enabled()) && !_is_using_identity_transform()) {
|
|
if (_is_vi_visible() && !(is_inside_tree() && get_tree()->is_physics_interpolation_enabled()) && !_is_using_identity_transform()) {
|
|
// Physics interpolation global off, always send.
|
|
// Physics interpolation global off, always send.
|
|
RenderingServer::get_singleton()->instance_set_transform(instance, get_global_transform());
|
|
RenderingServer::get_singleton()->instance_set_transform(instance, get_global_transform());
|
|
@@ -204,7 +206,7 @@ RID VisualInstance3D::get_base() const {
|
|
VisualInstance3D::VisualInstance3D() {
|
|
VisualInstance3D::VisualInstance3D() {
|
|
instance = RenderingServer::get_singleton()->instance_create();
|
|
instance = RenderingServer::get_singleton()->instance_create();
|
|
RenderingServer::get_singleton()->instance_attach_object_instance_id(instance, get_instance_id());
|
|
RenderingServer::get_singleton()->instance_attach_object_instance_id(instance, get_instance_id());
|
|
- set_notify_transform(true);
|
|
|
|
|
|
+ _set_notify_transform_when_fti_off(true);
|
|
}
|
|
}
|
|
|
|
|
|
VisualInstance3D::~VisualInstance3D() {
|
|
VisualInstance3D::~VisualInstance3D() {
|