hello everyone
I have some meshes and the camera can zoom to the mouse cursor. when I am panning near the meshes, they start to vanish.
here is my PG: https://playground.babylonjs.com/#EBPQH9#80
how can i solve this problem?
hello everyone
I have some meshes and the camera can zoom to the mouse cursor. when I am panning near the meshes, they start to vanish.
here is my PG: https://playground.babylonjs.com/#EBPQH9#80
how can i solve this problem?
I have a try, but it didn’t work, ummmm I find that camera._updateFrustumPlanes() never use to update frustumPlanes, it is too confuse
Sorry but your PG does not look like your screenshot What should we do in the PG to repro your issue?
Hi @Deltakosh
sorry for my mistake, I have updated my PG: https://playground.babylonjs.com/#EBPQH9#81
and here, if you rotate the camera you can see the issue
Hi @Moriy
Thanks a lot for answering to my question
so why should I call the _updateFrustumPlanes?
Your issue is camera clipping. Near (minZ) is clipping the object. You can play with minZ like in the playground bellow (even though I am not sure it’s smart to use negative minZ value). Maybe it should be better to set minZ = 0, and make sure that you limit zoom to the object, so it cannot come near enough to clip the object.
If you don’t understand what’s camera frustum and clipping planes, you can check this, or read through ton of material on the internet.
-z would work for the camera but a simpler trick is to position your meshes on z in front of the camera cause at the moment you are simulating being inside of it
oh my mistake. I thought about the question again, I find that move2DView function scales the size of camera Ortho, it seems that this camera go far aways from models, but actually the camera always stays at one place. firstly, you should set camera.maxZ big enough. secondly you should move camera far away from model when you change the ortho by move2DView.
I repro this question in unity, you can have a look to understand why this question happended.
init state
Hi @nogalo
great. Thanks a lot for your explanation.
Hi @sebavan
Thank you so much for your recommendation.