it is ok to scale some
i think gimpact and mesh shape can’t be scaled, but everything else should be ok
Any other opinions? I am also wondering whether the sdk should just iterate over all controls below the scaled node to find any physics control and scale it’s shape (and/or if it’s even possible to scale already attached shapes, like if there is a getter for that?)
During the development of Minie, I did some experiments. I concluded that, in modern versions of Bullet, all collision shapes except SimplexCollisionShape may be scaled uniformly, ie by (0.2,0.2,0.2) or (9,9,9). So it’s fine to scale GImpact and mesh shapes.
The following collision shapes should only be scaled uniformly:
CapsuleCollisionShape
ConeCollisionShape
SphereCollisionShape
A CylinderCollisionShape may be scaled arbitrarily on its principal axis, but the other 2 axes must have the same scale factors. In other words, its cross section must be a circle, not an ellipse.
Minie includes a CollisionShape.canScale() method that implements these rules.
JME does not support non-uniform scaling… so even if you did try to support it in bullet it would be incompatible.
JME pretends to support non-uniform scaling but it’s only sensible to do it on Geometry (ie: leaves of the graph). This is because scale is rolled up into one value for the whole path to the parent… so non-uniform scaling does not pay attention to rotation/translaction/etc. as it should.
So just keep that in mind when supporting non-uniform scaling. (I personally think that JME should disallow non-uniform scaling on Nodes… something to consider for JME4, maybe.)