You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #85455 from xiongyaohua/fix_CSGPolygon_not_following_Path3D
Notify CSGPolygon about transform changes in Path3D
This commit is contained in:
@@ -50,6 +50,10 @@ Path3D::~Path3D() {
|
||||
}
|
||||
}
|
||||
|
||||
void Path3D::set_update_callback(Callable p_callback) {
|
||||
update_callback = p_callback;
|
||||
}
|
||||
|
||||
void Path3D::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
@@ -67,8 +71,12 @@ void Path3D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_TRANSFORM_CHANGED: {
|
||||
if (is_inside_tree() && debug_instance.is_valid()) {
|
||||
RS::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
|
||||
if (is_inside_tree()) {
|
||||
if (debug_instance.is_valid()) {
|
||||
RS::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
|
||||
}
|
||||
|
||||
update_callback.call();
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user