three.js - JavaScript orientation beta offset WebGL -
i've been stuck on problem ages. unfortunately i've not had success in searches across google / stack. totally stumped.
the crux of problem adjusting beta value returned deviceorientation
event in javascript.
what want adjust beta value equal 0 when phone held upright. i've tried compensate value reducing beta both positive , negative integers of 90 use integer of 0 , adding reduced event.beta
value; no avail.
the idea behind concept using gyroscope orientate three.js camera / object within panorama. when tilt phone up, up, down equals down , holding level results in looking forward. i've tried using of plugins out there (namely 1 mrdoob , threex), motion doesn't seem work, unfortunately. there weird z axis rotation spins scene rather pans in mrdoobs example , threex sets level position when phone held flat, rather upright.
any suggestions on maths here appreciated.
Comments
Post a Comment