Physics3D/BoxCollider3D: Fix lengths
btBoxShape takes half-size as a parameter
This commit is contained in:
parent
1f68cfa6c2
commit
899739cdce
|
|
@ -116,7 +116,7 @@ namespace Nz
|
||||||
BoxCollider3D::BoxCollider3D(const Vector3f& lengths) :
|
BoxCollider3D::BoxCollider3D(const Vector3f& lengths) :
|
||||||
m_lengths(lengths)
|
m_lengths(lengths)
|
||||||
{
|
{
|
||||||
m_shape = std::make_unique<btBoxShape>(ToBullet(m_lengths));
|
m_shape = std::make_unique<btBoxShape>(ToBullet(m_lengths * 0.5f));
|
||||||
}
|
}
|
||||||
|
|
||||||
BoxCollider3D::~BoxCollider3D() = default;
|
BoxCollider3D::~BoxCollider3D() = default;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue