Outerra forum

Outerra Engine => Ideas & Suggestions & Questions => Topic started by: DeltaSim on May 06, 2012, 12:23:38 am

Title: Head Tracking "Hack" via Mouse Control
Post by: DeltaSim on May 06, 2012, 12:23:38 am
Hi, the recent few lines we exchanged on head tracking (http://www.outerra.com/forum/index.php?topic=997.msg11582#msg11582 (http://www.outerra.com/forum/index.php?topic=997.msg11582#msg11582)) got me hooked on the subject again. Especially when simulating a hang glider you will sooner or later need this, since we rely heavily on the unobstructed view all around - and it's of course one of the reasons why everyone should try it at least once :-). Yesterday, I tought my head tracking program to simulate mouse movements according to the head movements, which works nicely. However, I had a hard time figuring out how many pixels of mouse movement correspond to how many degrees in Outerra. Can you give me a quick number on this?

Cheers,

Martin
Title: Re: Head Tracking "Hack" via Mouse Control
Post by: angrypig on May 06, 2012, 06:00:47 am
Final number depends on your mouse because we are using the raw mouse data which has much higher resolution than original window GetCursorPos function and more important is that the raw data is linear...

our equation is:
mouse_relative_motion * 0.002 * mouse_sensitivity == angle in radians
default mouse_sensitivity is 1.0

For UI stuff we are using windows cursor functions without modification.

fix: 0.001 -> 0.002
Title: Re: Head Tracking "Hack" via Mouse Control
Post by: DeltaSim on May 06, 2012, 08:49:47 am
Great, thanks! It seems that the Windows cursor functions are sufficient for what I am trying to do. I'll let you know when it works :-).