Propagate reset_physics_interpolation through RemoteTransform2D/3D
This commit is contained in:
parent
1e6b11dcd4
commit
0f50b6b608
2 changed files with 20 additions and 0 deletions
|
@ -114,6 +114,16 @@ void RemoteTransform2D::_notification(int p_what) {
|
||||||
_update_cache();
|
_update_cache();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_RESET_PHYSICS_INTERPOLATION: {
|
||||||
|
if (cache.is_valid()) {
|
||||||
|
_update_remote();
|
||||||
|
Node2D *n = Object::cast_to<Node2D>(ObjectDB::get_instance(cache));
|
||||||
|
if (n) {
|
||||||
|
n->reset_physics_interpolation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED:
|
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED:
|
||||||
case NOTIFICATION_TRANSFORM_CHANGED: {
|
case NOTIFICATION_TRANSFORM_CHANGED: {
|
||||||
if (!is_inside_tree()) {
|
if (!is_inside_tree()) {
|
||||||
|
|
|
@ -113,6 +113,16 @@ void RemoteTransform3D::_notification(int p_what) {
|
||||||
_update_cache();
|
_update_cache();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_RESET_PHYSICS_INTERPOLATION: {
|
||||||
|
if (cache.is_valid()) {
|
||||||
|
_update_remote();
|
||||||
|
Node3D *n = Object::cast_to<Node3D>(ObjectDB::get_instance(cache));
|
||||||
|
if (n) {
|
||||||
|
n->reset_physics_interpolation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED:
|
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED:
|
||||||
case NOTIFICATION_TRANSFORM_CHANGED: {
|
case NOTIFICATION_TRANSFORM_CHANGED: {
|
||||||
if (!is_inside_tree()) {
|
if (!is_inside_tree()) {
|
||||||
|
|
Loading…
Reference in a new issue