HenryPeng Posted July 29, 2016 Share Posted July 29, 2016 Hera is an example, http://www.babylonjs-playground.com/#1BKDEO#43 I created two worldspacecanvas named canv1 and canv2, In the beginning, canv2 is over can1, but canv2 will be under canv1 when canv2.position is reset. It happens on using FreeCamera, AcrRotateCamera is no problem. Is it a bug ? @Nockawa Quote Link to comment Share on other sites More sharing options...
Nockawa Posted July 29, 2016 Share Posted July 29, 2016 3 hours ago, HenryPeng said: Hera is an example, http://www.babylonjs-playground.com/#1BKDEO#43 I created two worldspacecanvas named canv1 and canv2, In the beginning, canv2 is over can1, but canv2 will be under canv1 when canv2.position is reset. It happens on using FreeCamera, AcrRotateCamera is no problem. Is it a bug ? @Nockawa A WorldSpaceCanvas (WSC) is in reality a Mesh (a Plane), positioned in the Scene, that displays the canvas' content. Whether canv1 is other the top of canv2 or the opposite depend on the Z value of the node. Per default if you change nothing both canv1/2 have the same Z, so we have a case of Z-fighting issue. I've tried to change the canv2.position.z but looks like it doesn't change the order both Canvas are drawn. I think it's more related to the Orthographic camera mode. Try to do the exact same thing by creating two Planes instead of a WSC and if the behavior is the same then you have to escalate this of the 3D people of bjs. Quote Link to comment Share on other sites More sharing options...
HenryPeng Posted July 30, 2016 Author Share Posted July 30, 2016 I've tried it, I created just two Planes, and they worked well when I used Orthographic camera mode . I think it is a bug for WSC. Here is my example : http://www.babylonjs-playground.com/#1BKDEO#44 @Nockawa @Deltakosh Quote Link to comment Share on other sites More sharing options...
Nockawa Posted July 30, 2016 Share Posted July 30, 2016 2 hours ago, HenryPeng said: I've tried it, I created just two Planes, and they worked well when I used Orthographic camera mode . I think it is a bug for WSC. Here is my example : http://www.babylonjs-playground.com/#1BKDEO#44 @Nockawa @Deltakosh Ok, I can see your issue now, I understand it. But I don't know why suddenly it switch places and go underneath the canv1, I'm investigating right now. thanks for reporting! Quote Link to comment Share on other sites More sharing options...
Nockawa Posted July 30, 2016 Share Posted July 30, 2016 I need the help of @Deltakosh on this one, DK, I've made a simpler BG; http://www.babylonjs-playground.com/#1BKDEO#89 I don't understand why but the scrolling canvas is suddenly switching to the bottom, I've logged the z position value of each canvas but they don't change. What I don't understand is that regarding to the 3D Scene, a WSC is just a Mesh built from a plane and I never do anything else...So a bit of help would be appreciated. Both Canvas have a different position.z, their value is not changing and still at some point it's changing Z position.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.