Jump to content

Create/Draw a wall between 2 points


legallon
 Share

Recommended Posts

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 !

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...