renjianfeng Posted April 1, 2017 Share Posted April 1, 2017 Then it goes bad. Duplicate labels end up everywhere,Here is an image when I rotate the camera ! var ui = new BABYLON.ScreenSpaceCanvas2D(scene); var radioUi=[] for(var i=0;i<meshes.length;i++){ radioUi[i] = new BABYLON.Group2D({ parent: ui, trackNode: meshes[i], children: [ new BABYLON.Rectangle2D({ id: "mainRect", x: -5, y: -5, width: 10, height: 10, fill: "#abe2ffFF", border: "#0090ffFF", borderThickness: 3, roundRadius: 5, }) ] }); } Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 2, 2017 Author Share Posted April 2, 2017 I'm so sorry,My English is not very good,Maybe I didn't describe my problem,I added a lot of tags on the meshes,This effect is very good, But there are some labels I don't need,They seem to be behind the camera,I don't know how to handle it....Thanks to all the people who helped me!!! If you can read Chinese,Please Look at the words here! 我在使用canvas2d中的Group2D trackNode时,出现了一个bug,当我转动相机视野的时候,在相机的背面出现了一些不需要的标签,这些标签使用canvas2d绘制,通过trackNode绑定到所有需要的mesh上面,我不知道如何解决这个问题,感谢所有提供帮助的人。@Deltakosh Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 3, 2017 Share Posted April 3, 2017 I'll ping @Nockawa Quote Link to comment Share on other sites More sharing options...
Nockawa Posted April 4, 2017 Share Posted April 4, 2017 Hi I've created a GitHub issue for you https://github.com/BabylonJS/Babylon.js/issues/1966 I'm on holiday right now but I'll check as soon as I can. Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 5, 2017 Author Share Posted April 5, 2017 thinks!!! Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 7, 2017 Author Share Posted April 7, 2017 My colleague found that this method can be used to fix the bug for the time being radioUi = new BABYLON.Group2D({ ... }); box.onBeforeDraw = function(){ radioUi.levelVisible=true; } scene.beforeRender = function(){ radioUi.levelVisible=false; } Quote Link to comment Share on other sites More sharing options...
Nockawa Posted April 18, 2017 Share Posted April 18, 2017 hello @renjianfeng I'm back from holidays, I couldn't take a look sooner. I'm glad you found a workaround but I would still like to find the bug and fix it! Sadly, I don't understand what is special in your case to make this going bad. We have many people using Group2D with trackNode and there is no clipping issue so far. I know it's going to be difficult for you to explain, but can you do your best to explain what you are doing with the 3D scene objects and also with the Canvas2D nodes? The more code you share the better it will be. If you really have difficulties to write in English, post a very well explained message in Chinese, @MasterK will translate it to me, he owe me at least this! Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 19, 2017 Author Share Posted April 19, 2017 Ok, I'll try to reproduce it,in the babylonjs-playground! Quote Link to comment Share on other sites More sharing options...
MasterK Posted April 19, 2017 Share Posted April 19, 2017 I think he's fine. Dont need translation... even he said chinese to me. I cant write english much better than him... Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 19, 2017 Author Share Posted April 19, 2017 Look here~~~ http://www.babylonjs-playground.com/index2_5.html#WAHD81#9 Quote Link to comment Share on other sites More sharing options...
sable Posted April 19, 2017 Share Posted April 19, 2017 I think this is same bug I had a few months back here. It is however fixed in the latest version (the fix is here, from the end of last year). Quote Link to comment Share on other sites More sharing options...
Nockawa Posted April 19, 2017 Share Posted April 19, 2017 @renjianfeng you do not want to use the 2.5 version, it's really less stable than the 3.0 Alpha. Please use the babylon.js and babylon.canvas2d.js files from here as it's the ongoing 3.0 preview files and I've spent a lots of time to stabilize the version. Thanks Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted April 19, 2017 Author Share Posted April 19, 2017 Yes, I find it in version 3.0 is right, I'll update our project to use babylon3.0, thank you! 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.