oschakravarthi Posted October 1, 2018 Share Posted October 1, 2018 Hi, Thank you all for your support. I am progressing well with my POC. I am stuck on a problem. On a click on a mesh, I am populating few buttons into CylinderPanel. The panel is being displayed somewhere else. not even in the viewport. This panel should be shown to the user in front of the camera so that user can click on any of the buttons. How can I bring the panel in front of the camera (or make it appear in the viewport). Thanks in advance. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted October 1, 2018 Share Posted October 1, 2018 The easiest way I know is to use an anchor and then move the anchor. let anchor = new BABYLON.TransformNode("") // this can be a mesh, too anchor.position = new BABYLON.Vector3(0, 0, 0); // or whereeverr cylinderPanel.linkToTransformNode(anchor) To bring in front of the camera, you can use the camera position and facing direction (getForwardRay()), but I imagine you have a set place in the scene. oschakravarthi 1 Quote Link to comment Share on other sites More sharing options...
oschakravarthi Posted October 1, 2018 Author Share Posted October 1, 2018 Thank you @brianzinn It did not work when i try to reposition it to some other 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.