Skip to main content

Questions tagged [mouse]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
207 views

I want to implement a panning system, and people said to me that the cursor should be locked in place during the panning. However in Unity all I could find is setting the ...
Tudvari's user avatar
  • 801
1 vote
1 answer
67 views

I am currently implementing a map editor for a 2D platformer and run into trouble with my viewport and mouse movement. I have two viewports: one main viewport in the top 2/3 of the screen which has a ...
Canox's user avatar
  • 113
0 votes
1 answer
203 views

I have a grid of Area3D objects, and when nothing is around them, they handle the mouse_entered signal exactly as I would expect. The only issue is that I also use Area3D's on other game objects, like ...
Fred Etingen's user avatar
0 votes
2 answers
93 views

I am trying to get the camera to rotate towards a location and position. Which works at the moment, but once it is done and re enables the mouse look script or bool in the script the mouse look ...
WestMansionHero's user avatar
0 votes
1 answer
442 views

I am working on a 2D isometric perspective game using SDL2 and I would like to implement the ability to pan the map when the right mouse button is held down. I was wondering what is best way to set ...
lancen's user avatar
  • 33
0 votes
2 answers
323 views

I know we're able to scroll a background image hardcoded or using awsd keys(or arrows) if they're pressed. But what about scrolling it with mouse movement? So I have a piece of panoramic image as a ...
Intice's user avatar
  • 31
1 vote
1 answer
2k views

I want to position a 3D object at my mouse cursor. How can I do that in Godot? In Unity, I'd use Camera.ScreenToWorldPoint.
idbrii's user avatar
  • 1,088
0 votes
1 answer
352 views

i am learning how to make a 2d game using sdl and c++ and am currently trying to rotate the sprite so that is always facing the cursor, my game is set up with an entity component system, i have a ...
user21746705's user avatar
2 votes
2 answers
6k views

This question refers to the use of enhanced input in Unreal Engine 5. Whenever I say "modifier", I refer to modifier keys such as Shift, Alt, and Ctrl (rather than the Input Modifers such as ...
Simon Fischer's user avatar
0 votes
1 answer
318 views

I'm working on a basic Vulkan renderer that's presently relying on Win32 raw mouse input for camera pitch and yaw. It's all very basic, but what I've noticed is that at higher frame rates, I'm ...
pdm's user avatar
  • 103
0 votes
1 answer
581 views

I want to detect when a UI object it dragged and released on top of a game object. The drags starts on a sprite on the canvas outside of the game object. I tried using ...
mustafa candan's user avatar
3 votes
1 answer
384 views

My Win32/DirectX 11.1 project requires that I render the mouse cursor myself rather than use the system cursor. This is easy enough; however, I've found that there is a human-perceptible latency when ...
Matthew Elkins's user avatar
1 vote
2 answers
1k views

I am working on a 2D game with a spatial node (a 3d node) inside a viewport. Nodes within the viewport should be able to detect user input from what I can find online, but for some reason it doesn't ...
Qusk2's user avatar
  • 11
0 votes
0 answers
224 views

I'm working on a twin stick shooter where the player looks at the mouse cursor. Like most I use the absolute mouse position and the player's position to determine the direction and derive an angle. ...
mjx's user avatar
  • 1
1 vote
1 answer
343 views

How can I implement snapping via code? I have this 2d circle that the players rotate via drag and it works like a rotating dial. The best way to describe what I wanted to achieve is similar to a clock ...
PeytonFarquhar's user avatar
0 votes
0 answers
299 views

I have a 3D game. The player can rotate the character left+right using the mouse, and move the character forward+backward using the keyboard. The problem is how to set the speed in which the mouse ...
Erel Segal-Halevi's user avatar
0 votes
0 answers
149 views

How would I make it so that rather on the game screen the GUI is on the side of the screen and puts the game screen in its own little area so that its not covering part of the screen because right now ...
Zwei's user avatar
  • 1
0 votes
0 answers
151 views

So, I am working with Unity's new input system and I have been able to set up movement on the camera so that the user drags the camera around with the middle mouse button. However, there is a parallax-...
ACour008's user avatar
0 votes
1 answer
2k views

I am making a 2D game using Unity, and in the game you see the world from the side like in the first Super Mario games. But instead of moving the camera by walking, I want to move the camera by ...
Ridertvis's user avatar
  • 155
0 votes
1 answer
199 views

I'm trying to handle mouse wheel input (aka scroll wheel) on a plain old mouse. if pyxel.btn(pyxel.MOUSE_WHEEL_Y): print(pyxel.mouse_wheel) This never triggers....
Arnaud Meuret's user avatar
0 votes
1 answer
112 views

I'm kinda new to python and pygame, anyone know why this won't show bullets coming out from my character? ...
luckee365's user avatar
0 votes
1 answer
326 views

Basically, I'm doing a game for a school project and I am not really sure how to make a player point towards the mouse pointer in a pygame tab. also if anyone has ideas of how i could point a bullet ...
luckee365's user avatar
0 votes
0 answers
27 views

So i have a simple shooter game, and i need to shoot with mouse click. I use Input.GetMouseButtonDown(0), but it seems that if I click too fast only a few actually ...
Kon's user avatar
  • 88
1 vote
1 answer
6k views

I'm confused about ScreenPointToRay Definition of this method says "Returns a ray from camera through a screen point". I'm trying to visualize it to understand how it works. But its not ...
Apoleytaa's user avatar
0 votes
0 answers
275 views

I am making a flight combat game and I want to add mouse aim to control to the flight script I am using. Is there any way I can add mouse aim to my script similar to Warthunder's mouse aim. Mainly ...
Timothy Moore's user avatar
0 votes
1 answer
775 views

I'm making a game menu in Pygame, consider the following block of code: ...
Salem's user avatar
  • 226
1 vote
0 answers
439 views

Is there a way for Input System code to determine what kind of device generated an Input Action's current event, so that it can be filtered based on device type? The example I have is an Orbit Camera ...
davidA's user avatar
  • 141
0 votes
2 answers
361 views

I'm making a simple 2D shooter game in pygame and I've come across an issue when making the character aim its gun at the mouse. To make the gun aim up and down, I've set it so that the gun uses the ...
jaregax432-awinceo's user avatar
0 votes
1 answer
337 views

I am writing a chess game using Java and Swing, And I wanted to get the tile position on which a mouse clicked. I searched through internet, but all of them were really off, and never accurate. When I ...
anonymous's user avatar
0 votes
0 answers
28 views

I would like to use two computer mice simultaneously, and to record data their separate movements on windows. I have successfully used TeamPlayer to create two cursors, but the software that I am ...
Lizzie Yarwood's user avatar
0 votes
1 answer
206 views

I tried to measure a distance from one point to another point on my phone screen by using following code: ...
vito's user avatar
  • 107
0 votes
1 answer
235 views

The commonly used equation for camera rotation with a mouse does not involve time. This make sense since higher frame rates have smaller changes in mouse position and vise-versa so it all evens out. ...
ddxm's user avatar
  • 3
1 vote
1 answer
3k views

I have switched my game to use the new Unity Input System, and I want to know which mouse button was pressed when an action is called. Here's how it's set up: Whenever one of these three mouse ...
caleidon's user avatar
  • 591
1 vote
2 answers
2k views

In all games I wrote so far, I used Input.GetMouseButton or Input.GetMouseButtonDown inside ...
Erel Segal-Halevi's user avatar
1 vote
1 answer
150 views

I am looking to write a non-network multiplayer game for Windows 10 with QB64 that accepts input from 2 or more USB mice plugged into the system. Like a simple Pong game where additional players plug ...
madscijr's user avatar
2 votes
1 answer
286 views

I'm working on a class responsible for arm sway in an fps engine, and am having an issue with a stutter that appears to be related to fluctuating framerate. However I have also noticed it when locking ...
whitwhoa's user avatar
  • 201
1 vote
1 answer
145 views

I tried to display a player image in a 800x600 window using PyGame but when I try it, the window just gets stuck (immovable with mouse drag, minimize,maximize and close button is stuck and not ...
user avatar
0 votes
0 answers
345 views

I'm writing an SDL2 program, in which I create a SDL_CreateWindow and get its SDL_GetWindowSurface, then I prepare some pixel ...
Kagaratsch's user avatar
0 votes
1 answer
5k views

EDIT: I changed the bottom left to -1,-1 and the top right to 1,1, and while I can draw objects within this range, I cannot map the mouse x,y to the world space. I have been trying to learn OpenGL and ...
Ian Rosenberg's user avatar
0 votes
1 answer
909 views

I'm implementing a framerate independent FPS camera and I'm having a problem with jerky camera. The camera is smooth if I translate it or if I make it rotate at a fixed rate, but as soon as I start to ...
Karlovsky120's user avatar
0 votes
1 answer
65 views

In my game I am trying to have numbered blocks and math operators be able to be dragged down into their respectively color coded holders (white holders = Numbers, black holders = operations). The ...
kayra yorulmaz's user avatar
0 votes
1 answer
279 views

Here is the code I used on Cursor script, attached to a chest object. ...
watercollider's user avatar
1 vote
1 answer
132 views

I am building a 2D board game in Unity with a static camera pointed down at the game board. During the active phase of each player's turn, I want to detect where they click on the board. Fortunately, ...
JKreft's user avatar
  • 113
1 vote
1 answer
4k views

Conway's Game of Life I have been working with a tilemap for the implementation of a cellular automata game. My current method for getting mouse button input is using an Area2D as a child of the ...
Kennichi Nitta's user avatar
0 votes
0 answers
468 views

So, as the question says I need to resize the canvas according to screen size. However the thing is that that's not it. I also need to have the mouse coordinates updated proportionally. Seems like I ...
Nirabhra's user avatar
0 votes
0 answers
96 views

I would like to know, how to do so that when moving the mouse to the right, it would go to the left and vice versa. I looked for something related on the gamemaker page, but I didn't find what I'm ...
Boneco Sinforoso's user avatar
0 votes
1 answer
65 views

I'm learning a course on unity and when we started learning about taking mouse input the following code is used. ...
Mahmood Darwish's user avatar
0 votes
0 answers
84 views

I am making small isometric game, where I want to do something when user clicks a tile. I can simple do it by mouse location, but I want to be able for zooming and moving camera. It will be 2D game ...
user avatar
0 votes
1 answer
174 views

In the Unity Editor I accidently changed the image for the mouse cursor in project settings > player How can I restore it to the default, preferably not through programming?
Levi C. Olson's user avatar
1 vote
2 answers
435 views

I am rotating a globe like XCOM's hologlobe, I rotate it using Quaternion.RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta). I found a good value for ...
aybe's user avatar
  • 815

1
2 3 4 5 6