Scaling an object in three.js

user2788945 picture user2788945 · Oct 3, 2013 · Viewed 20.3k times · Source

I am getting Matrix3.getInverse(): can't invert matrix, determinant is 0 three.js 3976 error when I am trying to scale a cube object.

var object = new.THREE.Mesh(geometry, material)
 xScale = 0.1;
 object.scale.x = object.scale.y = object.scale.z = xScale;

Could someone help me out of this.

Answer

mrdoob picture mrdoob · Nov 25, 2015

Matrix3.getInverse(): can't invert matrix, determinant is 0 usually happens when either the scale.x, scale.y or scale.z are 0. Make sure you're not scaling the object to 0.