Merge pull request #45861 from nekomatata/physics-3d-contact-points-debug

Fix contact points debug for 3D Physics
This commit is contained in:
Rémi Verschelde 2021-02-10 10:32:04 +01:00 committed by GitHub
commit 844caafa4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -567,6 +567,12 @@ void Viewport::_notification(int p_what) {
int point_count = PhysicsServer3D::get_singleton()->space_get_contact_count(find_world_3d()->get_space());
RS::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, point_count);
for (int i = 0; i < point_count; i++) {
Transform point_transform;
point_transform.origin = points[i];
RS::get_singleton()->multimesh_instance_set_transform(contact_3d_debug_multimesh, i, point_transform);
}
}
} break;
case NOTIFICATION_WM_MOUSE_EXIT: {