CardboardVR-iOS icon indicating copy to clipboard operation
CardboardVR-iOS copied to clipboard

isLookingAtCube - How to determine yawlimit and pitch limit

Open swaps12 opened this issue 9 years ago • 1 comments

Hello,

We are extending the cube sample to display a structure with 3 components, basically a video player with 2 buttons. They are positioned close to each other but dont overlap. I have implemented islooking at for all three components. But isLookingAtVideo, isLookingAtButton1, isLookingAtButton2 all are returning true at the same time.

Can you guide me as too y this is happening. Also in isLookingAtCube you have set yawLimit & pitchLimit at 0.12. Can you tell me how you arrive at this number.

Everything is set as with Cube.

Thanks for taking time out. Regards, Swapna.

swaps12 avatar May 27 '15 12:05 swaps12

Hi @swaps12, I have a more up to date fork of this project here.

The 0.12 value comes directly from Google's example. I think it is a threshold angle in radians (so if you look at the cube within a [-0.12, +0.12] angle, it will detect it).

rsanchezsaez avatar May 27 '15 12:05 rsanchezsaez