Posts RSS Comments RSS Del.icio.us Digg Technorati Blinklist Furl reddit 68 Posts and Comments till now
This wordpress theme is downloaded from wordpress themes website.

Fix minor camera bug (with GLM camera)

My previous post’s Release 001 had a camera bug such that turning right from the initial state was broken.  You can see this if you run the WebGL (Emscripten) previous post’s Release 001 demo – just press “E” to turn right a little.

The bug was related to mixing up degrees and radians.  Basically what happened was that I used a simple camera from this tutorial ( http://bit.ly/1M3FLfL ) (by Tom Dalling) to generate my viewProj matrix.  The tutorial is dated 2013/01/21 and uses GLM ( http://glm.gtruc.net ).  But GLM 0.9.6.0 released 2014/11/30 changed GLM from degrees to radians, which broke the camera.  See GLM release notes “Transition from degrees to radians compatibility break and GLM 0.9.5.4 help” here ( http://glm.g-truc.net/0.9.5/updates.html ).

I fixed this tiny bug (and I started rewriting/refactoring the camera).  I also added keyboard controls “R” to look up and “F” to look down.  Here’s a WebGL (Emscripten) Release 002 with the fix – Release 002

Trackback this post | Feed on Comments to this post

Leave a Reply