Making an accelerometer/gyroscope in webgl -
i need make like this except instead of rotating around mouse, need input pitch yaw roll in text box , rotate. try modify seem not working. there library kind of stuff?
if want use library recommend glmatrix. following:
var q_ori = quat.create(); //holds orientation // stuff ... quat.rotatey(q_ori, theta); //(accumulate change in yaw theta) //finally convert rotation matrix mat3 or mat4.fromquat mat4.fromquat(outmatrix, q_ori); //pass shader or whatever
Comments
Post a Comment