I’m trying to scale some objects, but I find that they become weird when negatives are used… So I’ve been trying to figure out a way to fix the weirdness (objects flipping back to positive scales when they should be negative).
Why do objects not work with negative scaling?
For example setFromMatrixScale() will cause all negatives to become positive.
gizmo.groupInstance[i].instance.scale.setFromMatrixScale( gizmo.groupInstance[i].oldMatrix );
matrix.makeScale( gizmo.group.scale.x * Math.sign( gizmo.groupInstance[i].oldScale.x ),
gizmo.group.scale.y * Math.sign( gizmo.groupInstance[i].oldScale.y ),
gizmo.group.scale.z * Math.sign( gizmo.groupInstance[i].oldScale.z ) );
gizmo.groupInstance[i].instance.scale.applyMatrix4( matrix );
I can’t seem to figure out how to keep it correctly negative… If I scale one axis negative… it seems okay… if I scale two axis, then it doesn’t work and acts weird… if I scale 3 axis then it becomes invisible and weird… what is going on?