Physics3D/Collider3D: Use btEmptyShape for NullCollider3D
Having no collider seems to break physics
This commit is contained in:
committed by
Jérôme Leclercq
parent
5126b5f8a2
commit
1f68cfa6c2
@@ -25,6 +25,7 @@ class btCollisionShape;
|
||||
class btConeShape;
|
||||
class btConvexHullShape;
|
||||
class btCylinderShape;
|
||||
class btEmptyShape;
|
||||
class btSphereShape;
|
||||
|
||||
namespace Nz
|
||||
@@ -179,8 +180,8 @@ namespace Nz
|
||||
class NAZARA_PHYSICS3D_API NullCollider3D final : public Collider3D
|
||||
{
|
||||
public:
|
||||
NullCollider3D() = default;
|
||||
~NullCollider3D() = default;
|
||||
NullCollider3D();
|
||||
~NullCollider3D();
|
||||
|
||||
void BuildDebugMesh(std::vector<Vector3f>& vertices, std::vector<UInt16>& indices, const Matrix4f& offsetMatrix) const override;
|
||||
|
||||
@@ -188,6 +189,9 @@ namespace Nz
|
||||
|
||||
btCollisionShape* GetShape() const override;
|
||||
ColliderType3D GetType() const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<btEmptyShape> m_shape;
|
||||
};
|
||||
|
||||
class NAZARA_PHYSICS3D_API SphereCollider3D final : public Collider3D
|
||||
|
||||
Reference in New Issue
Block a user