File tree Expand file tree Collapse file tree 4 files changed +4
-26
lines changed Expand file tree Collapse file tree 4 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,6 @@ void Camera::_update_camera() {
168168
169169void Camera::_physics_interpolated_changed () {
170170 _update_process_mode ();
171- Spatial::_physics_interpolated_changed ();
172171}
173172
174173void Camera::set_desired_process_modes (bool p_process_internal, bool p_physics_process_internal) {
Original file line number Diff line number Diff line change @@ -1076,18 +1076,8 @@ Vector3 Spatial::to_global(Vector3 p_local) const {
10761076 return get_global_transform ().xform (p_local);
10771077}
10781078
1079- void Spatial::_physics_interpolated_changed () {
1080- data.notify_transform = data.notify_transform_requested || (data.notify_transform_when_fti_off && !is_physics_interpolated_and_enabled ());
1081- }
1082-
1083- void Spatial::_set_notify_transform_when_fti_off (bool p_enable) {
1084- data.notify_transform_when_fti_off = p_enable;
1085- data.notify_transform = data.notify_transform_requested || (data.notify_transform_when_fti_off && !is_physics_interpolated_and_enabled ());
1086- }
1087-
10881079void Spatial::set_notify_transform (bool p_enable) {
1089- data.notify_transform_requested = p_enable;
1090- data.notify_transform = data.notify_transform_requested || (data.notify_transform_when_fti_off && !is_physics_interpolated_and_enabled ());
1080+ data.notify_transform = p_enable;
10911081}
10921082
10931083bool Spatial::is_transform_notification_enabled () const {
@@ -1289,9 +1279,6 @@ Spatial::Spatial() :
12891279#endif
12901280 data.notify_local_transform = false ;
12911281 data.notify_transform = false ;
1292- data.notify_transform_requested = false ;
1293- data.notify_transform_when_fti_off = false ;
1294-
12951282 data.parent = nullptr ;
12961283}
12971284
Original file line number Diff line number Diff line change @@ -117,9 +117,6 @@ class Spatial : public Node {
117117 bool notify_local_transform : 1 ;
118118 bool notify_transform : 1 ;
119119
120- bool notify_transform_requested : 1 ;
121- bool notify_transform_when_fti_off : 1 ;
122-
123120 bool visible : 1 ;
124121 bool visible_in_tree : 1 ;
125122 bool disable_scale : 1 ;
@@ -179,9 +176,6 @@ class Spatial : public Node {
179176 // (e.g. changing Camera zoom even if position hasn't changed).
180177 void fti_notify_node_changed (bool p_transform_changed = true );
181178
182- void _set_notify_transform_when_fti_off (bool p_enable);
183- virtual void _physics_interpolated_changed ();
184-
185179 // Opportunity after FTI to update the servers
186180 // with global_transform_interpolated,
187181 // and any custom interpolated data in derived classes.
Original file line number Diff line number Diff line change @@ -102,10 +102,8 @@ void VisualInstance::_notification(int p_what) {
102102
103103 } break ;
104104 case NOTIFICATION_TRANSFORM_CHANGED: {
105- // NOTIFICATION normally turned off for physics interpolated cases (via
106- // `notify_transform_when_fti_off`), however derived classes can still turn this back on,
107- // so always wrap with is_physics_interpolation_enabled().
108- if (is_visible_in_tree () && !(is_inside_tree () && get_tree ()->is_physics_interpolation_enabled ()) && !_is_using_identity_transform ()) {
105+ // ToDo : Can we turn off notify transform for physics interpolated cases?
106+ if (is_visible_in_tree () && !SceneTree::is_fti_enabled () && !_is_using_identity_transform ()) {
109107 // Physics interpolation global off, always send.
110108 VisualServer::get_singleton ()->instance_set_transform (instance, get_global_transform ());
111109 }
@@ -209,7 +207,7 @@ VisualInstance::VisualInstance() {
209207 layers = 1 ;
210208 sorting_offset = 0 .0f ;
211209 sorting_use_aabb_center = true ;
212- _set_notify_transform_when_fti_off (true );
210+ set_notify_transform (true );
213211}
214212
215213VisualInstance::~VisualInstance () {
You can’t perform that action at this time.
0 commit comments