Advertisement

Using Mouse and analog Joystick input

Started by May 10, 2001 08:43 AM
0 comments, last by TheMummy 23 years, 9 months ago
Hi there, I am writing a 3D Space Action Shooter. At the moment I can controll the ship with mouse. Therefore I set the mouse to the center of the screen, after every input. When I receive a mouse move event I read the movement from the center of the screen. After reading the movement I set the mouse back the the center. That''s something I can''t do with a joystick. So should I change the mouse movement ? I mean restricting the mouse movement on a square of lets say 100x100 pixels around the center of the screen. But than I would have an absolut position of the mouse and not a relative movement of the mouse. Well I want the joystick players to be equal to the mouse players.... Not quite equal... I plan to write an input class that handles at least 2 different devices and sends ''ONE different'' input structure to the object, the player controlls...
I''m pretty sure you can get a relative mouse movement so that you don''t need to recenter the mouse every frame.

or just remember where it was last frame and take the difference


or make it work like a joystick, so that the farther away from the center of the screen the mouse cursor is the faster you turn

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement