Skip to content

Commit

Permalink
Merge pull request #78383 from Sauermann/fix-physics-object-init
Browse files Browse the repository at this point in the history
Fix Physics Picking captured Object initialization
  • Loading branch information
YuriSizov committed Jul 12, 2023
2 parents e88934c + 5b2a5cd commit 223370c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ void Viewport::_process_picking() {
capture_object = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_capture));
if (!capture_object || !camera_3d || (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed())) {
physics_object_capture = ObjectID();
} else {
last_id = physics_object_capture;
last_object = capture_object;
}
}

Expand Down

0 comments on commit 223370c

Please sign in to comment.