content

Mouse to joystick translation – FARCRY2 – part 2

It was explained in part 1 that absolute positions 1 to 82 give a linear rotation speed (from 0 to about 50°/s), and position 83 a high rotation speed (450°/s for z, 200°/s for rz).

Following chart gives the rotation speed for a given virtual position of z that goes from 0 to 645. That gives a linear speed from 0 to 450°/s. Virtual positions from 83 to 644 have to be created.

Blue dots are speeds that are achieved by real positions with a standard ps3 controller.
Red line is obtained with a simple linear regression.

Each mouse packet applies a rotation speed over a time that is the inverse of the mouse frequency (for ex 100Hz => 10ms).

A rotation speed for a virtual position between 83 and 644 may be generated “in average”.

For example, if a speed of 450°/s is applied (virtual position 645=real position 83) over 5ms, and 0°/s is applied (real position 0) over 5ms, the average speed that is obtained over 10ms is 225°/s (virtual position 321).

0+83 makes crappy movements, that technique actually works great with 82+83

I realized afterward that it is similar to PWM.

copyright
This entry was posted in Mouse translation, PS/2 Mouse/Keyboard to PS3 controller and tagged . Bookmark the permalink.

2 Responses to Mouse to joystick translation – FARCRY2 – part 2

  1. Cybereu says:

    How did you measured that ?

Leave a Reply

Your email address will not be published. Required fields are marked *

feedback
podcast