A very common input device in computer games. It offers a more direct form of movement compared to directional input.
-1
votes
0answers
35 views
Mouse controlled camera bisbehaving. [closed]
I wish to implement a free roam camera that I can control with a mouse in OpenGL. Unfortunately, moving the mouse seems to rotate the camera incorrectly (along weird axes) when my camera is facing a ...
-2
votes
1answer
56 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: ...
-1
votes
0answers
32 views
XNA Threading Causes Mouse to Disappear?
I am getting strange behavior from IsMouseVisible when using threads. If I use sessionHandler.Stop() (my instance) from Game1 (the main game), then IsMouseVisible gets set to true, and the mouse will ...
2
votes
0answers
60 views
Converting Mouse Coords to 3d coords with Camera position
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
68 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 ...
1
vote
1answer
73 views
c# opentk - converting screen coords to world coords
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
42 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 ...
0
votes
1answer
117 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
140 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
114 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
205 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 ...
0
votes
0answers
106 views
LWJGL Mouse Input [closed]
I have this mouse function in my LWJGL program:
public void mouseInput(){
int mouseX = Mouse.getX();
int mouseY = 600 - Mouse.getY();
int mouseDX = 0, mouseDY = 0;
int lastX = 0, ...
9
votes
1answer
329 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);
...
4
votes
0answers
219 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
180 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. ...
0
votes
0answers
65 views
Windows API basic paint program
Just trying to learn a bit of Win API. I'm trying to make a basic drawing app, a bit like MS Paint.
For the time being I'm trying to get one function to work which is, when you left click and drag ...
-1
votes
1answer
194 views
Help needed throwing a ball in AS3
I'm working on a flash game, coding on the time line.
What I'm trying to accomplish is the following:
With the mouse you swing and throw/release a ball which bounces against the walls and eventualy ...
2
votes
1answer
144 views
Turning to face mouse
Given three points on the same Y plane;
A ship
A point along the ships heading
A mouse cursor
How can I find which direction and angle the mouse cursor is from the ships heading?
I have a limited ...
2
votes
2answers
158 views
What sort of data should be sent for mouse-based movement in a multiplayer game?
I'm new to the Multiplayer Rodeo here so please bear with me...
I am just getting started and I'm trying to figure out how to deal with movement.
I've looked at the question Best way to implement ...
0
votes
2answers
141 views
AS3 Stage3D Mouse click problem?
I have a problem with Mouse interaction and Stage3D.
The only way I found to register to listen to mouse clicks and interact with Stage3D, is to add a mouse eventListener directly to the .stage.
...
1
vote
2answers
846 views
Trap mouse in SDL
How can I trap the user's mouse inside my game? It's not a fullscreen game, but I want it so that the user cannot drag the mouse to outside the screen?
Do I have to check the coordinates of the mouse ...
2
votes
1answer
385 views
Rotating To Face a Point
I am trying to rotate a line to point to the mouse's world coordinates (rather where the mouse lies on the plane where y=0).
I am running into a couple of problems though:
Whilst it follows the ...
0
votes
1answer
187 views
Java Slick2d - Mouse picking how to take into account camera
When I move it it obviously changes the viewport so my mouse picking is off.
My camera is just a float x and y and I use g.translate(-cam.cameraX+400, -cam.cameraY+300); to translate the graphics. I ...
-1
votes
2answers
993 views
C# XNA Handle mouse events?
I'm making a 2D game engine called Clixel over on GitHub. The problem I have relates to two classes, ClxMouse and ClxButton. In it I have a mouse class - the code for that can be viewed here.
...
1
vote
2answers
1k views
How can I do Mouse Selection In OpenGL 3.0?
Hello I'm pretty good programmer I've made my own 2D games in SDL and made a gui in 3D using Old OpenGL and Modern OpenGL but.. I'm having problems with trying to click 3D models with opengl I have no ...
4
votes
2answers
207 views
Minesweeper: Mouse listener problem
I have wrote a code for game Minesweeper and there is no problem with the graphics,but there is some problems with MouseListener. Here is my code
/*
* To change this template, choose Tools | ...
1
vote
2answers
354 views
What is the best way to handle MouseEvents in AS3?
What is the best way to handle MouseEvents?
Should I add an event on each MovieClip I want to work with, or a general Event at a holder MovieClip (or even at the stage) with internal control from the ...
0
votes
2answers
502 views
How to set blur on mouse over and remove on mouse out in AS3?
How can I do it? I want to active glow when the mouse is over a Sprite and remove it when the mouse is out. Is it possible?
I have the following code:
var myGlow:GlowFilter = new GlowFilter();
...
1
vote
1answer
318 views
Mouse click rectangle doesn't update to actual mouse position
I'm making a menu in XNA; and to solve clunky input via arrow keys, I thought I would use mouse input. I got everything to work perfectly, then I tried to click on something specific and nothing ...
3
votes
1answer
319 views
Controlling the snake in a snake game with the mouse
I am trying to implement a snake game in C# using the WPF forms. Well I know to implement the snake game, where the snake is controlled by the keyboard. But how would I do it, if I wanted to control ...
1
vote
2answers
110 views
What is a library for event-driven mouse and keyboard input in Java?
The title basically says it all.
The only thing to take into consideration is it needs to be cross platform.
3
votes
2answers
2k views
Java Slick2d - How to translate mouse coordinates to world coordinates
I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen
public void render(GameContainer gc, Graphics g) throws SlickException
...
1
vote
2answers
154 views
What framework provides mouse-interactive components as game sprites? [closed]
Background:
I wish to make a really flashy chess game. The squares on the board will be unique terrain. The pieces will be colourful images. The pieces will be animated. The pieces will sometimes ...
2
votes
2answers
525 views
Making mouse pos realtive to a moving object
I'm coding my first actual game, trying without following tutorials, just trying to use my knowledge so far to make something playable. I'm creating (attempting) a simple side-scrolling shooter. I ...
1
vote
2answers
395 views
Detecting a click on a tile
I'm making a simple tile-map system in LWJGL, and I'm trying to figure out how to detect if the mouse is clicking inside of a tile. So far no matter where I click it's always the same tile that is ...
2
votes
3answers
1k views
How do I shoot bullets towards the mouse in a top down shooter?
I have a formula for pointing my main character of the game towards the mouse, and it gets the angle he needs to be turned to point towards the mouse. But how do I get the bullets from the gun to use ...
1
vote
1answer
1k views
Looking at the mouse position in a top down Unity game?
I'm trying to make a simple top down game where the player looks at wherever the mouse is pointed. The player is only going to rotate on the Y axis.
Here's what I have so far but I can't seem to get ...
7
votes
3answers
2k views
Is it possible to detect two different mice at the same time, and have their movements recorded seperately?
Im thinking of making a game that requires two mice to play. It needs to register the movement separately from one another. Is this possible? Or does the Windows architecture not allow for such ...
3
votes
1answer
655 views
Scrolling the camera when the mouse cursor gets to the edge of the screen
I was wondering if you could help me:
In XNA I have a hexagonal map, and the size of the map currently exceeds the size of the window. There is already code in place to move the 'camera' around the ...
1
vote
1answer
1k views
Picking objects with mouse ray
I simply want to pick a few spheres in my scene using the mouse-ray. I have implemented(copied most of it but with little understanding) a ray-sphere collision code. Also I have implemented the code ...
0
votes
2answers
972 views
AS3 > Mouse Event not happening?
Background: Trying to make a ball appear in the same location the mouse is positioned. Using Box2D Library. Working on a class file (.as)
Issue: The mouse event does not work (I click but nothing ...
0
votes
1answer
338 views
How can I respond to mouse events in AS3?
Background:
Trying to make a simple "drop the ball" game.
The code is located inside the first frame of the timeline. Nothing more is on the stage.
Issue:
Using QuickBox2D I made a simple If ...
0
votes
1answer
1k views
SFML - Moving a sprite on mouseclick
I want to be able to move a sprite from a current location to another based upon where the user clicks in the window. This is the code that I have:
#include <SFML/Graphics.hpp>
int main()
{
...
2
votes
1answer
970 views
2D Topdown Shooter - Player Movement Relative to Mouse
I'm trying to make a topdown 2D space game for my school project. I'm almost done but I just want to add a few little things to make the game more fun to play.
if (keystate.IsKeyDown(Keys.W))
...
6
votes
3answers
3k views
How do I simulate the mouse and keyboard using C# or C++?
I want to start develop for Kinect, but hardest theme for it - how to send keyboard and mouse input to any application. In previous question I got an advice to develop my own driver for this devices, ...
2
votes
2answers
1k views
Implementing a Custom Mouse Cursor in XNA
I have tried making a custom mouse cursor, hiding the real mouse, taking the real mouse delta and clamping it to a maximum speed. Here is the problem:
In windowed mode, the "real" mouse cursor moves ...
3
votes
2answers
682 views
Is there a universal method to send key or mouse input to any application from C#?
I need method or group of them to send signals to any application (browsers, games, et cetera) about mouse movement or key input.
I can easly retrieve an IntPtr to any process, but I don't know what ...
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
525 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
898 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 ...