Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: Head Tracking "Hack" via Mouse Control  (Read 6989 times)

DeltaSim

  • Jr. Member
  • *
  • Posts: 48
Head Tracking "Hack" via Mouse Control
« 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) 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
Logged
"The only way of discovering the limits of the possible is to venture a little way past them into the impossible." - Arthur C. Clarke

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: Head Tracking "Hack" via Mouse Control
« Reply #1 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
« Last Edit: May 06, 2012, 06:06:32 am by angrypig »
Logged

DeltaSim

  • Jr. Member
  • *
  • Posts: 48
Re: Head Tracking "Hack" via Mouse Control
« Reply #2 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 :-).
Logged
"The only way of discovering the limits of the possible is to venture a little way past them into the impossible." - Arthur C. Clarke