Physics3D/BoxCollider3D: Fix lengths

btBoxShape takes half-size as a parameter
This commit is contained in:
SirLynix 2023-03-10 13:23:49 +01:00 committed by Jérôme Leclercq
parent 1f68cfa6c2
commit 899739cdce
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ namespace Nz
BoxCollider3D::BoxCollider3D(const Vector3f& 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;