Cursor-Mouse ratio

Hello everyone,

Does anyone know how to change the gain on the cursor (or joystick)?
What I would like to do is change the ratio between the displacement of the mouse and it's
representation on the screen, so that a longer movement of the hand displacing the
mouse would now be required to displace the cursor on the screen with the same distance.

As well I would like to change the direction that the cursor will move in
relation to the
mouse movement (some kind of rotation).


Thank you
> Does anyone know how to change the gain on the cursor (or joystick)?

MOUSE:

Windows and Mac both have control panel settings for that.

For more general control, such as inversion, here is a suggestion:
Call HideCursor to hide the real the real cursor. Then in a loop, call
GetMouse to read the cursor position in X and Y coordinates. Apply
your own mouse gain function to those coordinates and draw your own
cursor using a Psychtoolbox drawing command, such as Screen 'FillOval',
which would create an oval cursor.

On each pass through the loop you'll have to erase the previous cursor.
Also, GetMouse stops when the real, invisible, mouse cursor reaches
the edge of the screen, therefore there will problems for gains less
than 1 if you want to cover the full screen. Be aware that mouse gain
(cursor displacement in pixels as reported by GetMouse / mouse movement
inches) increases with the speed of the mouse.

JOYSTICK:

multiply the joystick position by a gain factor to determine cursor
position. With joysticks, the OS and Psychtoolbox won't draw the
cursor for you automatically and update it's postion, you need to do
that in your script within a loop.

best,

Allen

PS. Reminder: When posting to the forum, please indicate OS9, OSX, or
WIN version, and include your full name.




On Dec 14, 2004, at 6:07 PM, betmozcho wrote:

>
>
>
> Hello everyone,
>
> Does anyone know how to change the gain on the cursor (or joystick)?
> What I would like to do is change the ratio between the displacement
> of the mouse and it's
> representation on the screen, so that a longer movement of the hand
> displacing the
> mouse would now be required to displace the cursor on the screen with
> the same distance.
>
> As well I would like to change the direction that the cursor will move
> in
> relation to the
> mouse movement (some kind of rotation).
>
>
> Thank you
>
>
>
>
>
>
>
>
>
> Post your message to: psychtoolbox@yahoogroups.com
> Please indicate OS9, OSX, or WIN version, and include your full name.
> Denis Pelli, David Brainard, and Allen Ingling.
> http://psychtoolbox.org
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>