How to set all 3 rotations of camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bigbman
Posts: 23
Joined: Thu Nov 04, 2010 6:35 am

How to set all 3 rotations of camera

Post by bigbman »

I'm pulling accelerometer data from a mobile device and am trying to rotate the camera accordingly on all 3 axes. I tried using the setRotation method, which works for two absolute coordinate rotations, but setting a third screws up the whole rotation.

I'm obviously rusty on my matrix math. Hoping to save some time by asking how I can set all three coordinate rotations for the camera.

Thanks!
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

I believe camera scenenodes now have a 'bindTargetAndRotation' flag that, if enabled, allows you to rotate and orient a camera via setRotation. You would just add your accelerometer rotations ontop of the set rotation.
__________________________________
...you'll never know what it's like, living your whole life in a dream...
Post Reply