Search the Community
Showing results for tags 'createpolygon'.
-
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)
-
solved (Solved) CreatePolygon DoubleSide No Longer Works
JohnK posted a topic in Questions & Answers
After I first pushed the CreatePolygon function and it went live the following this PG http://playground.babylonjs.com/#4G18GY#2 was giving doublesided polygons, now it is only showing one side. Have had a look at my original code in javascript in a preview version of 3.0 and the current version of 3.0 in Javascript. Other than the additions Jerome did for frontUVs etc I cannot see where any changes would affect the doublesidedness. What is worse is that running the current version of 3.0 with a local example and now on a PG https://www.babylonjs-playground.com/#12X68C I get no mesh at all, but running against the preview version of 3.0 it still works OK. The preview version I changed to add the polygon code was downloaded on 27 June 2017. Probably a lot changed since then but hopefully what it was that did it could be found. -
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
- 1 reply
-
- createpolygon
- texture
-
(and 1 more)
Tagged with: