Syncing up mesh rotation with light direction

yeah the problem is on the gizmo side. Rendering is correct. Light icon is not :wink:

Is this where to find the same build that’s used in Playground?
Babylon.js/dist/preview release at master · BabylonJS/Babylon.js · GitHub

I’m seeing same problem with inverted lighting using the build from that location in Github (but not in Playground). Latest build on left. Playground on right: https://www.babylonjs-playground.com/#1JLGFP#127

Correct :slight_smile:
playground is getting its files from preview.babylonjs.com which uses the link above

Hm. Well, there may be still a bug somewhere in here then. I get different results with same the build from preview and on the PG. And the workarounds that I used from the previous build no longer fix the issue with the light being reversed.

This is how I fixed it previously:
this.meshes[i].material.usePhysicalLightFalloff = false;

You must have a discrepancy somewhere. The PG only uses preview
Are you sure that you are using everything from preview? babylon.js, loaders, etc…

Ah yea - just occurred to me that i’m still using some other libraries from local. Will update those to use preview with fingers crossed.

That was it! It was the loaders file. Ooh and the gizmo is working again.
Phew, thank goodness. That was tough to work around.

Noting that with spotlights and pointlights, if I don’t turn off usePhysicalLightFalloff, it’s pretty tough to get something illuminated… need a light right up against it with high intensity.

1 Like