Physics3D/PhysWorld3D: Add generic RaycastQuery

This commit is contained in:
SirLynix
2023-03-23 13:16:06 +01:00
committed by Jérôme Leclercq
parent 4d42c0cf9c
commit 63d75e8904
4 changed files with 68 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ namespace Nz
inline BulletPhysWorld3D& GetPhysWorld();
inline const BulletPhysWorld3D& GetPhysWorld() const;
bool RaycastQuery(const Vector3f& from, const Vector3f& to, const FunctionRef<std::optional<float>(const RaycastHit& hitInfo)>& callback);
bool RaycastQueryFirst(const Vector3f& from, const Vector3f& to, RaycastHit* hitInfo = nullptr);
void Update(Time elapsedTime);