A very common input device in computer games. It offers a more direct form of movement compared to directional input.
2
votes
2answers
1k views
Why isn't my mouse input working as expected in a DX10 game?
I've made myself a camera for a DirectX 10 game, and the keyboard control works fine. However, I can't see to get the mouse to work. My biggest problem is I can't find out how to hide the mouse on the ...
2
votes
1answer
544 views
Allegro 5 Mouse Look
I found good tutorial on how to do mouse look for 2D game here: http://www.atburrow.com/2010/03/08/objects-facing-the-cursor/
My code looks like this:
w = (double)mouse_x - (double)pos_x;
h = ...
5
votes
6answers
936 views
How do I identify mouse clicks versus mouse down in games?
What is the most common way of handling mouse clicks in games?
Given that all you have in way of detecting input from the mouse is whether a button is up or down.
I currently just rely on the mouse ...
1
vote
1answer
2k views
XNA - Use Mouse To Rotate & Arrow Keys To Scroll A Linearly Wrapped Texture:
Using XNA I'm working on my first, relatively simple, videogame for the PC.
At the moment my game window is 1024 X 768 and I have a 'Starfield' linearly wrapped background texture 1280 X 1280 in ...
4
votes
1answer
5k views
How to get and use delta time
I have mice looking and walking in my game, but they are very slow and hard to use. I think it's because I'm using fixed speed. I heard that in big projects developers use delta time. How do I ...
3
votes
1answer
2k views
Mouse location is off due to camera
I'm building a top down shooter but I have a little issue with my camera and mouse.
When I add the camera that I use to my game (see here) my mouse pointer seems to be in the wrong location.
When I ...
16
votes
1answer
4k views
Isometric rendering and picking?
I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a diamond-shaped world.
The ones I've tried always seem to be, well, off.
What's the ...
10
votes
6answers
11k views
How to handle mouse input in XNA?
I am developing a card game in XNA.
Is there any OnClick event in XNA for objects?
I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws ...
4
votes
1answer
1k views
Unity MouseWheel weapon change
I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see.
I googled on how to do this and found that I have to use ...
29
votes
1answer
3k views
Mouse aim in an FPS
I would like to make a First Person Shooter and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen, the camera won't turn anymore. How can I keep the ...
3
votes
2answers
654 views
Mouse-driven Movement
I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface).
I'm trying to get ...