From bfc533fc4c2d739a701eaf6f483b7b5907ef0ea2 Mon Sep 17 00:00:00 2001 From: Angad Kambli Date: Mon, 8 Mar 2021 20:57:23 +0530 Subject: [PATCH] use collision mask in vehicle raycast --- scene/3d/vehicle_body_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 0d25e2f21ff3..8b774444b906 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -407,7 +407,7 @@ real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState3D *s) { PhysicsDirectSpaceState3D *ss = s->get_space_state(); - bool col = ss->intersect_ray(source, target, rr, exclude); + bool col = ss->intersect_ray(source, target, rr, exclude, get_collision_mask()); wheel.m_raycastInfo.m_groundObject = nullptr;