You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Fix Physics Picking captured Object initialization
Initialize variables when a captured object is known.
This commit is contained in:
@@ -839,6 +839,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user