Move collider shape raycasting utilities to the PhysicsColliderActor class

This commit is contained in:
Wojtek Figat
2024-02-16 17:19:51 +01:00
parent 42b4443e14
commit 85f2910718
6 changed files with 55 additions and 70 deletions

View File

@@ -2630,6 +2630,7 @@ bool PhysicsBackend::RayCastShape(void* shape, const Vector3& position, const Qu
PxRaycastHit hit;
if (PxGeometryQuery::raycast(C2P(origin - sceneOrigin), C2P(direction), shapePhysX->getGeometry(), trans, maxDistance, SCENE_QUERY_FLAGS, 1, &hit) == 0)
return false;
hit.shape = shapePhysX;
P2C(hit, hitInfo);
hitInfo.Point += sceneOrigin;
return true;