Camera orthographic projection

Hi guys,

I think this line (and all the other logical OR checks surrounding it) is buggy:

Matrix.OrthoOffCenterRHToRef(this.orthoLeft || -halfWidth

Basically if I’m setting any of these properties to 0, it will be ignored and -halfWidth will be used instead. In my demo I explicitly want to set orthoLeft to 0, and now the workaround is to set it to 0.001.

Maybe you could use the Nullish Coalescing operator instead?

You are so right!! Do you want to submit a PR?

Sure, I’ve submitted a PR here:

Let me know if this works.


Thanks this is super fine