Convex shape scaling
This commit is contained in:
parent
83d5d9ac6e
commit
0f85786eb0
|
@ -305,7 +305,8 @@ class RigidBody extends Trait {
|
|||
currentScaleX = v.x;
|
||||
currentScaleY = v.y;
|
||||
currentScaleZ = v.z;
|
||||
if (!isConvex) _shape.setLocalScaling(BtVector3.create(bodyScaleX * v.x, bodyScaleY * v.y, bodyScaleZ * v.z));
|
||||
if (isConvex) _shapeConvex.setLocalScaling(BtVector3.create(bodyScaleX * v.x, bodyScaleY * v.y, bodyScaleZ * v.z));
|
||||
else _shape.setLocalScaling(BtVector3.create(bodyScaleX * v.x, bodyScaleY * v.y, bodyScaleZ * v.z));
|
||||
physics.world.updateSingleAabb(body);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue