Mouse to joystick translation – FARCRY2 – part 1

(x,y) speed of the mouse has to be mapped to a (z,rz) rotation speed.

z and rz are in the range [0..255] with [83..173] as dead zone (128 is the center).

Following chart gives the rotation speed (degrees per second) given the absolute position of z.

This probably may change with the game (values are for Farcry).

This is quite linear except for the max position (83). The max speed that is in the linear area (position 82, about 50°/s) is not fast enough to only use the linear area. The speed of the max position is so fast (about 450°/s) that it shouldn’t be used over a long time.

There is the same behavior for rz, except that the speed of the max position is about 200°/s).

A heuristic has to be found to trigger the max position use.

Leave a Reply

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