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
0 votes
0 answers
35 views

Automatically determining the mouse sensitivity

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 ...
user avatar
0 votes
0 answers
33 views

Having GUI on side rather than on game screen

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 ...
user avatar
  • 1
0 votes
0 answers
21 views

Keeping speeds of camera & mouse movements the same on drag in Unity

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-...
user avatar
0 votes
1 answer
51 views

Move camera when dragging right and left

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 ...
user avatar
0 votes
1 answer
16 views

How to handle mouse wheel events in the Pyxel game engine

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....
user avatar
0 votes
1 answer
18 views

circles originating from player position not showing up on pygame window

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

How do I change only the angle of a certain PNG relative to the position of the mouse? (Python, Pygame)

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 ...
user avatar
0 votes
0 answers
174 views

Why is mouse sensitivity so high in WebGL build?

I made an FPS game in unity3d and exported it to WebGL. When I tested that, however, the mouse sensitivity was quite a bit higher than in the Unity application itself. I used the standard assets ...
user avatar
  • 101
0 votes
0 answers
16 views

Why Unity misses some of my mouse click? [duplicate]

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 ...
user avatar
  • 88
0 votes
0 answers
300 views

Unity 3D - Make character look at mouse with New input system/Character Controller

So I've been trying to make a top down game with the new input system. Been trying to make the character rotate and look at the mouse's position. The player moves on the x and z axis, with the camera ...
user avatar
  • 1
0 votes
1 answer
698 views

What is the logic behind of ScreenPointToRay?

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 ...
user avatar
0 votes
0 answers
56 views

How to add mouse aim to flight script

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 ...
user avatar
0 votes
1 answer
155 views

Pygame some methods aren't working properly (collidepoint and get_rect)

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

Unity Input System: How to handle input from specific device types when the binding abstraction fails?

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 ...
user avatar
  • 131
0 votes
2 answers
92 views

2D - How to make a gun muzzle aim at the mouse when the rotation pivot isn't on the muzzle?

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 ...
user avatar
0 votes
1 answer
59 views

Get on what tile has mouse clicked

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 ...
user avatar
0 votes
0 answers
23 views

How to detect two different mice at the same time, and record their separate movements? [duplicate]

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 ...
user avatar
0 votes
1 answer
25 views

How does time-dependent camera rotation with a mouse work?

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. ...
user avatar
  • 3
1 vote
1 answer
1k views

How to see which mouse button was pressed (Unity Input System)

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 ...
user avatar
1 vote
2 answers
547 views

When should I use OnPointerClick vs. Input.GetMouseButton?

In all games I wrote so far, I used Input.GetMouseButton or Input.GetMouseButtonDown inside ...
user avatar
1 vote
1 answer
79 views

reading input from multiple mice in QB64 in Windows 10?

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 ...
user avatar
2 votes
1 answer
191 views

What's causing this stutter when framerate fluctuates?

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 ...
user avatar
  • 171
1 vote
1 answer
49 views

The gameloop is stucking the window

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
97 views

SDL2 - show a tooltip at the cursor that displays RGB of the pixel under the cursor?

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

OpenGL convert mouse position to world coordinates without gluUnproject in Python?

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 ...
user avatar
0 votes
1 answer
196 views

Stuttery camera with mouse movement

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 ...
user avatar
0 votes
1 answer
40 views

Why won't my block Spaces/Holders hold my blocks when I drag onto them in Unity?

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 ...
user avatar
0 votes
1 answer
85 views

SetCursor: Cursor does not contain a definition for "SetCursor' or why can't I re-assign the cursor in Unity 20194.7f? [closed]

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

Best Practices for Locating Clicks

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, ...
user avatar
  • 113
1 vote
1 answer
934 views

Godot: How to get mouse button input for a Tilemap for Cellular Automata

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 ...
user avatar
0 votes
0 answers
173 views

How to properly resize canvas according to screen size? (Javascript)

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 ...
user avatar
0 votes
0 answers
42 views

How to reverse the movement of the mouse on the X and Y axes?

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 ...
user avatar
0 votes
1 answer
28 views

Question about taking mouse input in unity 2D

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

Java clicking on tiles detection

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
125 views

I accidently changed the cursor image in Unity

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?
user avatar
1 vote
2 answers
201 views

Rotate object always at same speed on screen, no matter camera distance?

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 ...
user avatar
  • 753
0 votes
1 answer
1k views

In Unity, how do I make text/annotations appear when I mouse over GameObjects in playmode?

How do I make text appear when I mouse over GameObjects in-game? What is the Unity jargon for this? I'm assuming it's 'annotations'.
user avatar
0 votes
0 answers
101 views

Mouse detect object without Collider?

Is there any method for mouse or ray to detect object doesn't have collider ? If no, what also can I use ?
user avatar
  • 507
0 votes
1 answer
67 views

Way to Prevent Stacking Pieces

I have a chessboard with all the black pieces that move with this code: I found that when I move the pieces, they will stack on top of each other. How can I prevent this? I have since changed the ...
user avatar
0 votes
1 answer
511 views

CharacterController rotation with mouse

I'm trying to rotate my characterController around with the mouse movement. I've tried to do so with this: ...
user avatar
  • 85
0 votes
1 answer
2k views

How to get the actor to follow the mouse while clicking and holding?

I am trying to do the top down project from scratch. I can already get the actor to move toward the mouse click: Only I need to keep clicking several times to change its path and keep walking ...
user avatar
3 votes
1 answer
167 views

Can Event Triggers be used on Non-UI objects?

Is there any way to use UI-Based event triggers on Non-UI objects? Example : on any UI object, you add an EventTrigger component, set the event, and then set the ...
user avatar
  • 33
0 votes
1 answer
946 views

Unity 2D launch player towards mouse location

few notes: I'm new to game development I'm not new to developing (1 year of front end web development) I'm trying to get my character to launch towards mouse left click button (which I understood to ...
user avatar
0 votes
2 answers
123 views

Extending control remapping script to work with mouse buttons

I have created a default key map for my game, however I have also included an option in the settings where the player can change the key bindings. My issue is if the player clicks on the button for ...
user avatar
1 vote
1 answer
428 views

Clone gameobject on drag without having to click a second time

I have a standard Cube gameObject (with a BoxCollider and my CubeController.cs script) in my scene and I want to be able to click and drag on it to instantiate a new cube prefab (with a BoxCollider ...
user avatar
0 votes
1 answer
362 views

How to make my character walk by clicking and holding the mouse button?

I created an Action Mapping using the right mouse button as a reference. The Action Map is called "Andar" (walk in english). In the character code, I call this Action Mapping and in it I make the ...
user avatar
0 votes
2 answers
3k views

Problem with action mapping

Summarizing my problem well, I need a single button (right mouse button) to do two things. In my project (TopDown) I defined that instead of the left mouse button, the character moves with the right ...
user avatar
0 votes
1 answer
41 views

Where is the part of the code of the mouse click in the TopDownCharacter blueprint?

I have a project where by pressing the B key, the character after a time interval is teleported to a point on the map. I can do this. It turns out that I imposed conditions so that at the end of the ...
user avatar
0 votes
2 answers
874 views

Drag 3D camera with mouse cursor

I have a camera that is moved by changing its X and Z coordinates. However, the camera is rotated, so when an object moves by 1 unit in the world, the number of pixels it moves by isn't trivial to ...
user avatar
  • 1,106
4 votes
3 answers
4k views

Unity Round(Circle) Buttons

I have been using unity and C# scripting now for the past 2 or 3 weeks. So yeah i am very new to unity and C#. I wanted to know if there is a way to make a round(circle) button without using the ...
user avatar

1
2 3 4 5