Jump to content

[bug] DebugLayer with viewport


Recommended Posts



When using the BABYLON.viewport() and  BABYLON.debugLayer() the "Clickable Labels" are not positioned on the objects.





I also noticed that when you disable the skybox (in the playgroud "MESHES TREE"), everything disappears on scene(land, water and objects)


This is the case when I put

skybox.renderingGroupId = 0;

and the rest

renderingGroupId = 1;


If I have a skybox presents the renderingGroupId = 1 will disable although the skybox.
Maybe it is normal behavior. I just wanted to point out that too in case.
Link to comment
Share on other sites

Ok this was because I was not supporting multiple cameras.

Now you will be able to do :

scene.debugLayer.show(true, camera)

in order to define which camera do you want to use for the debugLayer



The second point was an awful bug as well. Everything will be fixed for next push :)



For the specific case of skybopx.renderingGroup =1, this is expected because the skybox is then written on top of others meshes

Link to comment
Share on other sites

I just tried, that's better. :)  By cons, is it normal that objects disappear at a certain distance from the camera ?

I do not know what can cause this problem. The objects themselves remain visible, but the labels disappear.

Here is a picture to illustrate what I said:

Link to comment
Share on other sites

Made in, no. as I said I do not know what produce this bug on my scene. because the playgroud, I was unable to reproduce it. but surely because I do not use everything I use on my scene.


But I'll keep trying to find what create the bug.

Link to comment
Share on other sites

Ok.I understood the problem. I'll explain in French for simplicity.


Donc, sur la démo ci dessous, quand tu clique sur "z" pour déplacer la sphère avec la camera 1 qui la suit, dès qu'elle sort du champs de la seconde camera (la mini-map) le label disparaît. C’est un peut différent sur ma scène, mais c’est en gros le même probleme que j'ai reproduis différemment.


Donc la position des label est ok sur la camera 1, mais la visibilité dépend de la camera 2. Pourtant j'ai bien mis : scene.debugLayer.show(true, camera);


Sur cette démo donc, il suffit de cliquez sur "Z" ou "S" avec les Labels d'activer et Statistics de désactiver pour mieux voir la mini-map et de regarder jusqu’à ce que la sphère n'apparaisse plus dans la mini-map (en bas a droite). a ce moment le Labels disparaît de la sphère. J'ai mis du temps a comprendre que c'était ca.


D'ailleur Si je ne met pas de signature dans show(true, camera);  le comportement est le même, comme si de déterminer une camera n'y changeais rien. Voila j’espère que cela aideras.




Merci Delta

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...