Jump to content

Rounded Retangle


lindylex
 Share

Recommended Posts

Hi and welcome lindylex. Sorry to see you haven't got a reply yet so perhaps a gentle bump will help. Don't know of a simple way, but that does not mean there isn't one. Have a read here http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#extruded-shapes

You will have to create your own set of points for the vector3 array to give you the rounded rectangle shape (doing it in xy plane with origin at centre of rounded rectangle would be simplest). The extrusion path would be from origin to (0, 0, x/5) where x is width of rectangle.

Also be aware that the extrusion example is to change an existing extrusion. When you build a new extrusion the you need a scene parameter after the options object like the box example here http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter

Have a go at building an extruded shape in the playground. I would do a simple example for you but am away and only on my mobile.

 

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...