[SOLVED] pc.Mat4#invertTo3x3: Matrix not invertible

This warning “pc.Mat4#invertTo3x3: Matrix not invertible” shows up a lot in the console when I run my game but everything seems to be working fine. What does this error generally mean?

Do you have anything that is scaled to 0?

Do you have a callstack to the error?

I don’t think have anything that is scaled to 0 explicitly. I may have some vectors that are scaled to a random number in a range that may include 0.

Chrome doesn’t actually report it as an error (red) but as a warning (yellow) and there really isn’t much of a stack trace. These are the two lines I get:

playcanvas-stable.dbg.js:2043 pc.Mat4#invertTo3x3: Matrix not invertible
invertTo3x3 @ playcanvas-stable.dbg.js:2043

Is the project public?

Yeah: https://playcanvas.com/project/517158/overview/space-shooter-tutorial

Found your problem, your Background entity’s scale is set to 0 on the Y axis:

Make it 1 or 0.001 and you should be fine.

It might only be a recent thing as the warning is appearing only if you move it at runtime.

On a side note, some of your async functions are sometimes trying to perform logic on destroyed entities which are throwing exceptions.

1 Like

Awesome, thanks. I’ll try that.