Jump to content

Can I create any shapes via BABYLON.MeshBuilder.CreatePolygon?


Recommended Posts

Hi all,


I tried to create a plane with holes, and I found the following seems good to me.



But when I did it via BABYLON.MeshBuilder.CreatePolygon, I found that it will ignore the y value of all points, so I am confused.


If I want to create some shpes(any) with holes in it, what's the better way to do it, or can I make CreatePolygon not ignore the y value?


Thanks in advance!


Link to comment
Share on other sites

Hi there,  please go through the official documentation, it covers all your questions (https://doc.babylonjs.com/how_to/parametric_shapes


 For Non Regular Polygon/ Extruded Non Regular Polygon -> the path should be in x0z plane.

and you can use extrude shapes in both z and y direction (ref - https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes)

Hope this helps, happy learning :) 

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.

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.


  • Recently Browsing   0 members

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