Setting target on DeviceOrientationCamera

I got some struggles to set the target on DeviceOrientationCamera. My problem is the initial orientation is not pointing toward the z-axis. I’ve created this playground to illustrate my issue:

Is it possible to configure the DeviceOrientationCamera, so it points towards a given vector, when it initialize or on a update.

I read other had similar issues, but was not able to dig out an answer.

cc @RaananW as he knows a lot about the orientation cam :slight_smile:

The device orientation camrea is using your device’s rotation. The “0” is set by the device itself and is a different on every device. So it is complicated telling the camera to “look at a specific object”. If you want to create an issue I can investigate soon how possible it is. There is technically a way to set the initial rotation (a private variable), and the user should be able to drag the camera using touch input. There is also a way to reset the rotation at a certain rotation, but not to force the camera to look at something.

Thanks for clearing it out @RaananW.

What I would like to accomplish is not to have the camera to look at a specific object. I “just” wont to calibrate it, so different devices have the same rotation offset. Currently the target gets overridden by the deviceorientation event.

If I am able to reset the rotation at a specific rotation, will the deviceorientation then update the cameras rotation in relation to this? Because this is all I need :slight_smile:

Oh, we are talking about roughly the same thing :slight_smile:
When i said “look at an object” , I actually meant - look at a specific direction based on your scene (i.e. “lookAt(position:Vector3)”);

At the moment there is no way to unify the “reset rotation” function to look in a specific direction.

Hello @dnrn just checking in, was your question answered?