Search the Community
Showing results for tags 'createpolygon'.
Found 4 results
Hi folks, I'm working on creating a custom shape using polygons for each side in world space around a given object, but when I call CreatePolygon it isn't producing the results I expect. Below is a playground with the example: http://playground.babylonjs.com/#8B86V8#3 I've done a little digging that has led me to believe that CreatePolygon only works with points aligned upon an axis as though it's a 2D shape. (Using X/Z components only, or X/Y etc). Is this assumption correct? If so, what should I use instead of CreatePolygon to create a custom shape in world space? (I'm looking to generate something similar to a frustum with a box at the end around an object, between the camera and the target object)
Both CreatePolygon and ExtrudePolygon use PolygonMeshBuilder but provide a more consistent feel to the function call. Also sideOrientation can be used with both. This means that when using MeshBuilder Jerome's new sideUV feature will be available. http://playground.babylonjs.com/#4G18GY
I am trying to make a prism generator using BABYLON.CreatePolyhedron. Everything seemed ok until I applied a texture to it. http://www.babylonjs-playground.com/#AVCC8#6 Babylon is splitting the mesh into triangles like you would expect, but then it is failing to map the new UV points in a sane way. I was able to manually set the new UV values to make it work, and can just automate the process, but It is a bit of a hack. Is there an easier fix to this? Thanks in advance for any help