mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-09 05:34:34 +00:00
few more tweaks
check for mass first in joltBody so that we set dynamic early
This commit is contained in:
parent
174e4d3329
commit
c81a809444
3 changed files with 12 additions and 11 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue