Yo @Deltakosh and @trevordev … I got a situation where i need to FLIP HORIZONTAL the CubeTextures used for 6 Sided Skyboxes as well as Pre Filtered Environments.
I am using GLTF as a scene file. that means it has a root node with a negative Z scale.
Well the negative Z scaling messes up physics simulations. If i where to drop a cylinder shape on to a slightly rotated forward cube shape. The cylinder would contact the cube and fall forward to the ground as expected. But with negative z scaling, the cylinder would fall behind the cube even though the cube is rotated forward.
@trevordev pointed out this negative z scale is messing with physics and i should FORCE the scene into right handed mode using scene.useRighHandedSystem = true BEFORE loading the scene. That worked… now physics object fall the right way.
But this now FLIPPED all my cubemap textures in the scene. Both the skybox and the environment. Is there some kind of property of function that can used to flip the textures horizontally. If o manually use my Mac using Preview to open the textures in the scene file and do Tools->Flip Horizontal that fixes the issues… So i know is a horizontal flip issue with the CubeTexture and the scene being forced into right hand mode.
Here is the original Unity shot. Not the horizontal rotation of the clouds in the sky and the little brown bush reflected in the sphere:
As you can see the force right handed cube textures are flipped horizontally. The Rotation-Y is fine. Its at 3.14 so the skybox and reflection show the proper orientation on the world… Again they are just flipped horizontally.
How are you loading the skybox/textures? Some may be bugs in babylon as some the loaders should look at the handedness of the scene but there is also a chance you should do it manually how Gijs mentioned. If you could create a playground that repros each issue it would be easier to determine which is solution is ideal.
But when i set scene.useRightHandSystem = true; /// Which i need for GLTF physics to work right… I also do a ddsTexture.invertZ = true… Which does flip it… But the PROJECTION of the reflected backgound looks all funky… Like the cubemab BOX and POS are out of wack: