Rotation Data from camera or Billboard


#1

I’m trying to figure out how to get the Rotation Data of the Camera with in a Photo Sphere.
I know @slothling had asked about it under his post (World space transformation data)
And I asked for tracking a Zapbox controller. Both where told to look into TriggerRegion.
But I started thinking is there a better way.

  1. Maybe using a Billboard and as it turns to face the screen then getting the data.

  2. I have a Raycaster getting the position data of where it hits the Photo Sphere. But I can’t find the math to convert it to Rotation data.

More or less I need to find out the Rotation data as you turn in a Photo Sphere.

Steve


#2

Hello @stevesanerd!

I was trying to do a similar thing.
Much like Serial.println(); and place in 3 fields in the project.
An X, Y & maybe Z field to reveal where you were pointing in the 360.
I want to believe it is possible. I’m just not sure how to request the data.

Bill


#3

This would definitely be rather tricky to pull off.

While it’s possible to get the position of an object in relation to the camera and then calculate relative angles from that, I’m not sure if it’s any help in this case as the 360 objects are traditionally parented to the camera.

Perhaps it’d be possible to parent three objects to the camera, placed one unit away from it in the x, y and z axis and have a TriggerRegion track these. The TriggerRegion would have to be placed in the initial position of the experience and rooted in place there. I’m not entirely sure but you might be able to calculate the device rotation from the position of the three axis objects.

No idea what this would do to the performance of a zap, but I think it shouldn’t be too bad. I’ve used similar methods for drawing lines between multiple points and had no issues there.