Vorion Posted February 26, 2018 Share Posted February 26, 2018 Hi, is it possible to link a gui control, like the one in this example https://www.babylonjs-playground.com/#XCPP9Y#20, to a TransformNode, instead of a mesh? Thanks Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 27, 2018 Share Posted February 27, 2018 In the typescript it is explicitly an AbstractMesh, but I also tried in your PG and got an error: h.getBoundingInfo is not a function. I think it's from here: https://github.com/BabylonJS/Babylon.js/blob/62400581618983fd2b089b0a32347074427c9961/gui/src/advancedDynamicTexture.ts#L343 That getBoundingInfo() method starts on AbstractMesh: https://doc.babylonjs.com/classes/3.0/abstractmesh#getboundinginfo-rarr-boundinginfo-classes-3-0-boundinginfo- That method is not available on Node (That AbstractMesh derives from). Although, I don't see why it couldn't work for a Node.... the short answer is no. edit: can you get away with an empty mesh what you are trying to do? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2018 Share Posted February 27, 2018 Even creating an AbstractMesh should work (I need at least an abstractMesh to get a bounding box) Quote Link to comment Share on other sites More sharing options...
Vorion Posted February 27, 2018 Author Share Posted February 27, 2018 Ok, thanks 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.