Mouse controls FPS camera - custom
Posted: Sat Dec 01, 2007 4:29 am
I'm building a player-based FPS character for a game I'm making, with a camera attached to the head. I've got rotation, target, and all that fancy stuff working fine. My only problem now is mouse control: I've got it working to the extent that you can use the mouse to turn around and everything, but it's got a bad feel that I want to work out. For example, it seems sluggish to move at first, and if you move the mouse too much its very easy to overcompensate.
I control looking by changing the target every iteration based on the mouse's distance from center, and then reset the mouse location to center. I thought this would be the right way to do it, but if feels really poorly done.
I wanted to see how it was done for the FPS camera, but I can't seem to find the source for it's movement in the API. Could anyone tell me where I might find that source?
Also, if anyone has ever done this before, could they give me some hints on how to work mouse movement?
Thanks for your time.
I control looking by changing the target every iteration based on the mouse's distance from center, and then reset the mouse location to center. I thought this would be the right way to do it, but if feels really poorly done.
I wanted to see how it was done for the FPS camera, but I can't seem to find the source for it's movement in the API. Could anyone tell me where I might find that source?
Also, if anyone has ever done this before, could they give me some hints on how to work mouse movement?
Thanks for your time.