legallon Posted May 3, 2018 Share Posted May 3, 2018 Hi everybody , hope you're doing great ! Working on a factory building interface, I'd like to be able to create a wall between 2 points. See this example here : https://www.babylonjs-playground.com/#03QEFL#0 This pg can help you understand my need : I want to click somewhere on my scene (this click would create a line attached to my mouse like in the pg), then move my mouse (the line would follow it like in the pg) and clik again somewhere else to "drop" this line and have a kind of wall ( by playing with the width etc.. of my line or whatever would be attached to the mouse). The problem is I saw that we couldn't change the width of 3D lines, and I don't really know how to "make a wall" by using tubes. Hope you understood what I was trying to say , Thanks for your time ! Quote Link to comment Share on other sites More sharing options...
Arte Posted May 3, 2018 Share Posted May 3, 2018 Hi @legallon This could help you. https://www.babylonjs-playground.com/#1QM99D#15 http://www.babylonjs-playground.com/#XBGEQ#8 legallon 1 Quote Link to comment Share on other sites More sharing options...
legallon Posted May 3, 2018 Author Share Posted May 3, 2018 Ok I see, you create a box on first click, and then the second click modifies the scaling of the box to reach the clicked position, right ? That's very interesting ! I will try to work on that thanks @Arte Arte 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 3, 2018 Share Posted May 3, 2018 31 minutes ago, legallon said: Ok I see, you create a box on first click, and then the second click modifies the scaling of the box to reach the clicked position Just a note to say that using MeshBuilder the positions of the clicks will give you the width and height of the wall and you can set the depth, in this way you can avoid the use of scaling. These may be of interest http://doc.babylonjs.com/snippets/house_use https://www.babylonjs-playground.com/#FZYG6W#1 Arte and legallon 2 Quote Link to comment Share on other sites More sharing options...
legallon Posted May 4, 2018 Author Share Posted May 4, 2018 Hi @JohnK, I will try to use what you told me, and see if it suits me better than the other way (which worked quite well). Thanks for your reply ! 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.