MD360Player4Android icon indicating copy to clipboard operation
MD360Player4Android copied to clipboard

Rotate camera by Angle

Open gbrlsnts opened this issue 8 years ago • 2 comments

I'm trying to reset camera position back to a certain position but it isn't possible with set pitch or set yaw, at least from what I've tried.

Would it be possible to add rotate camera to AngleX and AngleY, like we can set the position by AngleX and AngleY for an hotspot?

gbrlsnts avatar Jun 05 '17 01:06 gbrlsnts

hi @barricas , how do you calculate anglex, angley or something concert position ? could you help me?

vitrinh282 avatar Jul 10 '17 10:07 vitrinh282

Hi, I'm using data that already has these angles defined.

Maybe this will help you? (Look last answer with code) https://www.experts-exchange.com/questions/21869528/How-to-calculate-Pan-Tilt-angles-by-x-y-screen-projection-pixel-coordinates-for-spheric-panorama.html

Your problem would be getting the FOV value since the lib doesn't offer methods for that.

You can probably find out the fov with this math: https://www.opengl.org/discussion_boards/showthread.php/168009-How-to-get-the-horizontal-fov

If you look into MD360Director you have definitions of the near plane distance and the values for each side ( method updateProjection() ). But you have to modify the lib.

gbrlsnts avatar Jul 10 '17 20:07 gbrlsnts