Orthographic ArcRotateCamera not perfect Orthographic when seeing from above

Hi,

I’m using an ArcRotateCamera with mode = ORTHOGRAPHIC_CAMERA.

The problem is when beta = 0, it seems like the angle is not perfectly 0, but a little tilted.

In the playgroud below, there are 2 boxes, one stacked on the other.

When beta = 0 (seeing from above), you can see a litle of the underneath box, but I was expecting to see only the top box.

image

Is this a bug or am I missing something?

Thanks!

I think it can not be exactly 0 to prevent gimbal lock issues IIRC. cc @Deltakosh who might remember straight of his head :slight_smile:

It looks like the problem is just that the default lowerBetaLimit is 0.01 so beta isn’t actually set to 0 but 0.01. But if you remove the lower limit then it can be set to 0 and works as expected. :slight_smile:

Thanks @Blake! Setting lowerBetaLimit = 0 worked like a charm!

1 Like

Good catch, dunno why I was focusing on this one Babylon.js/arcRotateCamera.ts at 85e55d0d930f98162069554014495fc2c4e28b90 · BabylonJS/Babylon.js · GitHub