Unable to fix XYZ coordinates HDRI environment

Hi,

We are trying to scale the photo frame(.glb) and position it in the HDRI environment texture accordingly.

We have hardcoded the XYZ coordinates in the PG based on debugger values. Still the updated coordinates are not reflecting and photo in the frame is not visible

Pls suggest the way forward

Thanks
vij

image
This strange chars just before the X: :stuck_out_tongue:
Expand the inspector panel and you will see it’s the beginning of (Using Quaternion)
While you are try to use euler angles in your code.

.GLB files are loaded by default with Quaternion.
In the onSuccess callback of the load, add this on your mesh :

let rotation = mesh.rotationQuaternion.toEulerAngles();
mesh.rotationQuaternion = null;
mesh.rotation = rotation;

Then setting up the rotation using .rotation.x , rotation.y etc… Will work :slight_smile:

++
Tricotou

2 Likes

@Tricotou Tried yur logic using callback method but its not working

even tried with earlier approach (without callback ) unable to position the XYZ coordinates

Hello,

Here is a PG with the right onSuccess callback set
Keep in mind as well that you don’t have any other light that the directionnal one. Which means that if the plane is in the shadow, it’s perfectly black :

Set scene.environmentIntensity back to something >0.0 or setup another light, if you want to avoid this :slight_smile:

++
Tricotou

1 Like

Thanks a ton @Tricotou