A very common input device in computer games. It offers a more direct form of movement compared to directional input.

learn more… | top users | synonyms

1
vote
1answer
39 views

Algorithm for sensing mouse movements like a wiimote

I want to make a driving game where you can do tricks with your mouse when you hold down LMB. Ex. if you move it up in a straight line really fast (your cursor goes from the bottom to the top of the ...
0
votes
2answers
74 views

Mouse Look Controls [closed]

Right now I am not happy with my mouse look controls for a 3d game I am making. I have it set up so that when the mouse is moved the displacement is calculated and applied to the camera etc then the ...
0
votes
1answer
91 views

Lock mouse in center of screen, and still use to move camera Unity

I am making a program from 1st person point of view. I would like the camera to be moved using the mouse, preferably using simple code, like from XNA var center = this.Window.ClientBounds; ...
0
votes
0answers
32 views

XNA Windows Resolution / Mouse Position Bug

In XNA, when in windowed mode and resolution (set via PreferredBackBufferWidth/Height) is close to the resolution of the display, the view is distorted (zoomed in a bit)and the mouse coordinates are ...
1
vote
0answers
47 views

Mouselook stutters

I'm trying to set up mouselook for a 3d game in XNA. The mouselook itself is working but it seems to be stuttering a lot when I use it. The problem is, I have no way of reliably reproducing this ...
1
vote
0answers
35 views

How do I detect image clicks in Dark GDK?

I am trying to determine if an image has been clicked, using the Dark GDK game engine. I've found no methods in the engine that do this. I would rather not brute force this with a large nested ...
1
vote
2answers
253 views

How do I handle DirectX mouse events?

I am a beginner making my second game (simple low graphics FPS), in Visual C++ 2010. So far, I only know how to use keyboard controls. I've had source files like keyboard.h and keyboard.ccp, ...
0
votes
1answer
80 views

Bounding Box in Monogame for mouse picking - Ray perspective

My mouse ray is screwing up precision. I don't really know how to fix it, maybe you guys can help. problem : (5.6mg gif) https://www.dropbox.com/s/v0z67afso88hsd1/perspective_ray.gif how i create ...
1
vote
1answer
78 views

XNA - Prevent Holding of Mouse Button as Part of an Input Handler Game Component

I'm using C# XNA 4.0 Refresh. I'm working to create an InputHandler Game Component for my XNA game to handle all of the keyboard and mouse input. I used SixOfElevens RPG Game Tutorial (Here - ...
1
vote
1answer
85 views

TopDown 2d player control

Whats the usual way to control a player in a top down game? We have to look in the direction of the mouse cause the player hold a torch. My first try was: to to make it absolute like W move to ...
1
vote
1answer
141 views

Bounding Box in Monogame for mouse picking

Hello guys so I'm implementing this mouse manager to be able to pick up objects. My application uses mainly textured quads in 3d space. I'm using bounding boxes in monogame to do so, however my ...
1
vote
2answers
103 views

How can I fix my sprite being rotated 90 degrees more than toward the mouse?

I am trying to get a Sprite in LibGDX to look at the player's mouse. Here's the code I have (mind you, I am using JRuby): target = mouse_position.sub(spatial.position) rotation = ...
3
votes
1answer
105 views

Float-based screen coordinates, higher mouse precision

I wrote 2 weeks ago about problem with motion blur in my engine. When camera moves using keyboard, motion blur is smooth. But when I rotate camera using mouse motion blur is stepping (not sure if I ...
0
votes
1answer
370 views

How do I get the mouse position relative to the window, not the whole screen?

I am developing an XNA game. I run it in window mode. I need to handle mouse events, but when I use the Mouse class from Xna.Framework.Input.Mouse, I get the the mouse position on the whole screen. ...
2
votes
1answer
126 views

Mouse Speed in GLUT and OpenGL?

I would like to simulate a point that moves in 2D. The input should be the speed of the mouse, so the new position will be computed as following new_position = old_position + ...
1
vote
1answer
46 views

Why does my camera break mouse position targeting? [duplicate]

I made a short video of this. Basically, when the screen scrolls with the camera, the character begins firing at the incorrect mouse position. You can see where I am clicking the whole time. As we ...
3
votes
1answer
255 views

How can I detect mouse events on sprites in a canvas?

I'm making an HTML 5 game. I want mouse clicks on sprites drawn in a canvas element cause events that my code can react to. At the moment, I'm doing it by checking through all of my sprites in a ...
0
votes
1answer
179 views

How to handle simultaneous mouse and keyboard input with sdl?

I'm making a game in SDL2 that so far is basically just a top down shooter, where the player aims at the mouse. When I run the game, you can move properly and shoot properly, and shoot and move the ...
-2
votes
1answer
65 views

Clamp the scroll wheel value [closed]

I'm having something like an inventory bar at the bottom of the screen. However, when the highlight square (indicates what object you are going to place) reaches the end. The value of the scroll wheel ...
0
votes
1answer
168 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
2
votes
1answer
426 views

How to select a vertex by mouse clicking in OpenGL?

I'm programming a simple graph game and so far I'm still doing a few tests in OpenGL. Right now, let's say I defined a GL_POINT with the glVertex2f(20.0f, 0.0f). I have this function to calculate the ...
1
vote
1answer
1k views

Unity3D Drag Object with Mouse Gives Invalid Position

I am trying to implement a simple script to drag a GameObject with the mouse in Unity. However, when the position of the object is updated with the following script, I get an error saying: ...
0
votes
0answers
18 views

How to Point sprite's direction towards Mouse or an Object [duplicate]

I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off ...
0
votes
2answers
78 views

I need to move an entity to the mouse location after i rightclick

Well I've read the related questions-answers but still cant find a way to move my champion to the mouse position after a right-button mouse-click. I use this code at the top: float speed = ...
1
vote
1answer
167 views

Java: See if Mouse is hovering/clicking Sprite

The game I am developing is in which you defend the Cell from the Viruses, and I need the sprites to have a MouseListener for when the mouse clicks on that sprite, it will get destroyed, and I cannot ...
2
votes
1answer
163 views

When do you get Mouse.getstate().X or Y as negative?

I am creating a game in which I use a function: int x() { int px = 100; int pxend = 128; int xx = 0; for (int i = 0; i < 6; i++) ...
0
votes
1answer
80 views

Why am I getting a return value of zero from my position computation function?

Ok I have a Function int x(), which is used in new Rectangle(x(),a,a,a); in DrawMethod in XNA but when I use it I get x() = 0 as as the answer.Here is my CODE: int x() { int px ...
0
votes
0answers
15 views

Grab mouse input in OpenTK? [duplicate]

I've searched a lot on the Internet but I can't seem to find any code that works with the current OpenTK, that "grabs" the mouse input (just gives the delta-x and delta-y, for camera rotation for ...
0
votes
2answers
640 views

SharpDx how to detect if Mouse Button is pressed?

I'm wondering how it's possible to detect if a mousebutton is pressed or released. var di = new DirectInput(); _mouse = new Mouse(di); _mouse.Acquire(); _mouseState = _mouse.GetCurrentState() All I ...
0
votes
1answer
144 views

Mouse input not updating in custom XNA/Winforms panel

I have a custom Panel residing within my WinForm. the custom Panel holds the XNA rendering. So far, I've rendered an 3D test model. What I'm doing now is trying to handle the input.Using a camera from ...
1
vote
1answer
129 views

Getting mousemovement despite mouselock - unity

I have lockcursor so the cursor doesn't leave the screen, but now i have to rotate an object based on mouse movement (think garrys mod item rotation) but the mouse cursor is obviusly locked to the ...
4
votes
1answer
158 views

Is there a way to write a camera class without matrix-transformation?

I have a problem with a camera class I got from the internet. It does a transformation like this: public Matrix get_transformation(GraphicsDevice graphicsDevice) { _transform = ...
2
votes
2answers
828 views

LWJGL multiple keyboard/mouse input checks

As in many game libraries such as LWJGL, you can check mouse/keyboard events with Mouse.isButtonDown or Keyboard.IsKeyDown. I want to check for button/key presses, not if it's currently pressed down ...
5
votes
1answer
2k views

How do I read input from multiple keyboards/mice on one computer?

I want to be able to read inputs from multiple keyboards and still differentiate them. It's for split-screen. I know it's possible, because Serious Sam 3 allows it. Edit : Well a whole lot of my ...
0
votes
1answer
245 views

MonoGame Linux Mouse.SetPosition doesn't work!

Having a really weird issue, it seems that no matter what I do I cannot get the Mouse to lock to the center of the screen in MonoGame. I triple checked all the possible noob mistakes, and ...
1
vote
1answer
116 views

How to make camera rotation independent from frame rate?

I multiply the mouse movement by a given number to get camera rotation of a desired speed. But it only works at 60 FPS. When I don't limit the frame rate I get around 350 FPS and the camera rotation ...
-1
votes
1answer
368 views

Irrlicht mouse input

I am trying to make a chess game at this moment, using Irrlicht. It will be a 3D Chess game but apart from most chess games it has one special quality: Free movement of the camera. The Chess game ...
2
votes
1answer
970 views

Trap mouse in SDL2

When using SDL 1.2 it the way to implement full screen or windowed applications with "no cursor" you did the following: SDL_ShowCursor(SDL_DISABLE); SDL_WM_GrabInput(SDL_GRAB_ON); See Trap mouse in ...
-2
votes
1answer
105 views

Cannot get 3D mouse coordinantes [closed]

I'm using viewport.project() to find my mouse position in 3D space. I have my projection, view and world matrices defined in the same area that they are used to draw the model. Code is below: NOTE: ...
2
votes
0answers
425 views

Converting Mouse Coords to 3d coords with Camera position [closed]

So I've looked at all the answers I can possibly find, and nothing seems to fit what I need exactly (because im bad at math). I'll explain what I have thus far: A camera with x,y,z, Pitch and Yaw ...
1
vote
2answers
467 views

Exclusive mouse movement with WM_INPUT

Microsoft seems to recommend using WM_INPUT for input. I want to only get relative mouse input and hide the mouse cursor all together for a short while (For gesture based input). However, using ...
0
votes
3answers
1k views

How can I convert screen coordinatess to world coordinates in OpenTK?

I'm making a windows forms application with opengl view. I need to get the mouse coords converted to the opengl world coords. Well, my Y coord gets converted wrong. It's hard to explain, so here is ...
1
vote
0answers
171 views

Moving an object (pong paddle) along the x,y axis in 3d-space with mouse/touch

First of all: Sorry, my English isn't quiet good, I'm very new in 3D and I'am using JMonkeyEngine. What I would like to do?: A 3d pong game and I want to control the paddle with the mousecursor ...
1
vote
1answer
522 views

Moving the camera as in a first person shooter

I am trying to implement the movement of the camera with the mouse. The result I want to achieve is the same that you get when you move your aim in a first person shooter. Here is the code I wrote, ...
6
votes
2answers
356 views

How do I convert a 2D movement (from mouse) to a displacement along a 3d axis?

I'm making a small 3D scene editor (that only allow to modify objects positions). Each object is draw with a 3d X/Y/Z axis : How it works : user choose an axis (X, Y or Z) by left clicking on it, ...
3
votes
1answer
325 views

How to emulate knob turning, based on x/y movement?

I'm doing a game where one component is that you turn a knob. I'm having trouble getting good "knob behavior". I know the current touch/mouse X,Y location, and I keep track of the previous X,Y ...
3
votes
2answers
1k views

How to determine mouse position outside stage, and center the cursor?

I was wondering if it is possible to have my flash game determine the position of the mouse, even when the cursor is not inside the stage. My movie clip should move horizontally between x = 100 and ...
9
votes
1answer
1k views

C#/XNA get hardware mouse position

I'm using C# and trying to get hardware mouse position. First thing I tryed was simple XNA functionality that is simple to use Vector2 position = new Vector2(Mouse.GetState().X, Mouse.GetState().Y); ...
5
votes
1answer
660 views

Isometric - precise screen coordinates to isometric

I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...
-3
votes
1answer
363 views

Isometric Rendering and Picking [duplicate]

Possible Duplicate: Isometric rendering and picking? I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a non-diamond-shaped world. ...