Browse Source

Merge pull request #92536 from Daylily-Zeleen/daylily-zeleen/fix_3d_input_event

Add missing check to avoid passing handled input event to collision object 3d.
Rémi Verschelde 1 year ago
parent
commit
f565996472
1 changed files with 4 additions and 0 deletions
  1. 4 0
      scene/main/viewport.cpp

+ 4 - 0
scene/main/viewport.cpp

@@ -884,6 +884,10 @@ void Viewport::_process_picking() {
 		}
 		}
 
 
 #ifndef _3D_DISABLED
 #ifndef _3D_DISABLED
+		if (physics_object_picking_first_only && is_input_handled()) {
+			continue;
+		}
+
 		CollisionObject3D *capture_object = nullptr;
 		CollisionObject3D *capture_object = nullptr;
 		if (physics_object_capture.is_valid()) {
 		if (physics_object_capture.is_valid()) {
 			capture_object = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_capture));
 			capture_object = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_capture));