few more tweaks

check for mass first in joltBody so that we set dynamic early
This commit is contained in:
marauder2k7 2026-06-07 17:32:27 +01:00
parent 174e4d3329
commit c81a809444
3 changed files with 12 additions and 11 deletions

View file

@ -57,6 +57,7 @@ void JoltCollision::addPlane(const PlaneF& plane)
void JoltCollision::addBox(const Point3F& halfWidth, const MatrixF& localXfm)
{
JPH::BoxShapeSettings boxSettings(JPH::Vec3(halfWidth.x, halfWidth.y, halfWidth.z));
boxSettings.mConvexRadius = 0.01f;
auto result = boxSettings.Create();
if (result.HasError())
@ -329,6 +330,9 @@ bool JoltCollision::addHeightfield(
void JoltCollision::rebuildCompound()
{
// clear
mCompundShape = nullptr;
if (mChildren.empty())
return;