Jump to content

Rotate ground, DOUBLESIDE doesn't work


aarroyoc
 Share

Recommended Posts

Hi,

I've trying to rotate some grounds generated with the BABYLON.Mesh.CreateGround function. I want to simulate a flip deck but when it rotates it doesn't show anything. Later, searching on the docs I've found the sideOrientation option. It didn't work. Furthermore, I've tried disabling backFaceCulling but lightning doesn't work as expected, it goes black but it's better than nothing.

I'm thinking that maybe, the ground mesh doesn't support the sideOrientation feature but it would be strange.

var floorMesh = BABYLON.Mesh.CreateGround(roomName + "_floor", 1, 1, 1, scene, true);
floorMesh.sideOrientation = BABYLON.Mesh.DOUBLESIDE;
var floorMat = new BABYLON.StandardMaterial(roomName + "_floor_mat", scene);
floorMat.sideOrientation = BABYLON.Mesh.DOUBLESIDE;
floorMat.backFaceCulling = false;
floorMat.diffuseTexture = this.floor();
floorMesh.material = floorMat;

 

Is there a way to create a ground that has double side? Or do I need to create a fake ground using a box mesh?

Starting.PNG

End.PNG

Link to comment
Share on other sites

About the mesh side orientation (not the material one), it's not a property, but only a parameter passed at mesh geometry construction time, in the constructor call : CreateGround()

This parameter is used to design the internal geometry. The geometry can't be modified once created so 

floorMesh.sideOrientation = BABYLON.Mesh.DOUBLESIDE;

has stricly no effect.

http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#ground

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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