Jump to content

A Interesting Babylon Quirk


gryff
 Share

Recommended Posts

I ran across this by accident while changing values in a BABYLON.Vector3() and not noticing what I was actually doing.

 

Best way to describe it is to say take Tutorial 15 - The Skybox and Fog tut.

 

Change this line :

skyboxMaterial.backFaceCulling = false;

to

skyboxMaterial.backFaceCulling = true;

and then add this line

skybox.scaling = new BABYLON.Vector3(-1, 1, 1);

This additional line flips the box faces that are visualised to the interior ones.

 

Now it does appear to flip the skybox textures along the x-axis, but you can compensate for that by fliping the textures in a graphics program.

 

A quirk or undocumented bug - or perhaps undocumented feature? ;-)

 

cheers, gryff :)

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