Monday, 26 August 2013

C# Convert mouse position to radiance

C# Convert mouse position to radiance

I have a "small" problem with my code that convert the mouse position to
radiance.
I need the mouse position to determine where the head of my robot must
point to. The code works and head turns ... but! It reaches max of pitch
too quickly.
As I am not exactly super sharp in radiance calculation or C#, I have to
resort to expert help. :)
My code:
maxcursory = Screen.PrimaryScreen.Bounds.Height;
cursory = Cursor.Position.Y;
pitch = (float) (((3 / maxcursory cursory *) - 1.5) * 1);

No comments:

Post a Comment