masterdon Posted September 11, 2017 Share Posted September 11, 2017 Hi Everyone, I have created a grid using GridMaterial on box mesh. the issue is, the grid isn't coming complete. Its broken on all the edges(see the snapshot). i.e. no boundary lines to wrap everything in rectangle. i have also tried setting uOffset and voffset on material however its not working. what am i missing here? Here is my code: var gridBox = BABYLON.MeshBuilder.CreateBox("box1", { width: objectProperties.width-1, height: 0.05, depth: objectProperties.height + 1, updatable: true }, scene); gridBox.position = new BABYLON.Vector3(objectProperties.left + startFromLeftPosition + objectProperties.width / 2 - horizontalSlotHeight / 2, 10.05, startFromTopPosition - (objectProperties.top + (i > 0 ? 8 : 7))); var defaultGridMaterial = new BABYLON.GridMaterial("default", scene); defaultGridMaterial.majorUnitFrequency = 0; defaultGridMaterial.minorUnitVisibility = 0.1; defaultGridMaterial.gridRatio = 1; //defaultGridMaterial.uOffset = 0.5; //defaultGridMaterial.vOffset = 0.5; gridBox.material = defaultGridMaterial; gridBox.material.alpha = 0.5; Quote Link to comment Share on other sites More sharing options...
RaananW Posted September 11, 2017 Share Posted September 11, 2017 Hello @masterdon, it would be wonderful if you could reproduce it on the playground. This way we can all experiment with it and understand how we can help 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.