lindylex Posted June 18, 2016 Share Posted June 18, 2016 How do I create a rounded rectangle with a z axis 1/5 the thickness of the x axis width? Thanks Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 19, 2016 Share Posted June 19, 2016 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. 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.