Jump to content

Skybox from Environment Helper Infinite Distance


Recommended Posts

Hi Everybody !

I am not sure this is a bug or a wanted behavior, that is why I did not post on the bug section.

When you set the property infiniteDistance to true on a skybox created from the meshBuilder, then behavior is as expected : http://www.babylonjs-playground.com/#UU7RQ#66
But when you set the same property of a skybox create from an EnvironmentHelper, then it changes nothing : https://www.babylonjs-playground.com/#10D6YT#74

I saw in the source code of the TransformNode (line 735) that the parent attribute of the skybox is tested. Of course with the EnvironmentHelper it is not null. 
It is on purpose ?

"Solution" found while writing this post : Obviously I can get the skybox from the environmentHelper and set its parent to null, but it doesn't looks clean coding to me.

Except this, EnvironmentHelper is awesome to set up clean scene really fast ! I love it. 

Link to comment
Share on other sites

Hello, so yes infiniteDistance only works if there is no parenting (this is expected :))

The skybox is linked to an internal root mesh in order to let you Y rotation for the entire setup (skyox, ground, etc..)


So the way you found looks pretty ok for me :)


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.

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.


  • Recently Browsing   0 members

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