cartman Posted April 28, 2016 Share Posted April 28, 2016 Hi guys, loving BabylonJS! Unfortunately i'm stuck at this tutorial: http://www.pixelcodr.com/tutos/trees/game/index.html The tutorial was written using Babylon 1.13-debug. I tried using Babylon 2.3, and got a really weird tree. It appears that the vertices are somewhat messed up. This was the only change I made. Any ideas on how to solve this? Attached the pictures of the rendered trees. With Babylon 2.3 (messed up vertices, and somehow there's a gap between the trunk and the leaves) With Babylon 1.13-debug. Nice polygons. Quote Link to comment Share on other sites More sharing options...
jerome Posted April 29, 2016 Share Posted April 29, 2016 if the code uses some calls to the internal methods VertexData.CreateXXX(), you should take care that, as for BJS2.3, their signatures change from VertexData.CreateXXX(param1, param2, ...) to VertexData.CreateXXX({param1: val1, param2: val2, etc}) http://doc.babylonjs.com/classes/2.3/VertexData#static-createsphere-options-rarr-vertexdata-classes-2-3-vertexdata- https://github.com/BabylonJS/Babylon.js/blob/master/what's%20new.md ("breaking changes" part) cartman 1 Quote Link to comment Share on other sites More sharing options...
cartman Posted April 29, 2016 Author Share Posted April 29, 2016 4 hours ago, jerome said: if the code uses some calls to the internal methods VertexData.CreateXXX(), you should take care that, as for BJS2.3, their signatures change from VertexData.CreateXXX(param1, param2, ...) to VertexData.CreateXXX({param1: val1, param2: val2, etc}) http://doc.babylonjs.com/classes/2.3/VertexData#static-createsphere-options-rarr-vertexdata-classes-2-3-vertexdata- https://github.com/BabylonJS/Babylon.js/blob/master/what's%20new.md ("breaking changes" part) Thank you! Based on your tip, I use this line var vertexData = BABYLON.VertexData.CreateSphere({"segments":2,"diameter":sizeBranch}); // compliant with Babylon 2.3 and it works! GameMonetize 1 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.