Questions tagged [mouse]
A very common input device in computer games. It offers a more direct form of movement compared to directional input.
258 questions
1
vote
0
answers
207
views
How to lock the cursor in its current position in Unity?
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 ...
1
vote
1
answer
67
views
Move mouse from one viewport to another
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 ...
0
votes
1
answer
203
views
How to get around mouse entry signal stopping at first collision?
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 ...
0
votes
2
answers
93
views
Unity Camera snaps back to camera mouse look after lerping to a point and rotating normally. Once mouse look is re-enabled it overrides and snaps back
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 ...
0
votes
1
answer
443
views
How to achieve smooth camera dragging with the mouse in SDL2?
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 ...
0
votes
2
answers
323
views
Infinite scrolling with mouse
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 ...
1
vote
1
answer
2k
views
How do I make a 3D cursor that follows the mouse in Godot?
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.
0
votes
1
answer
352
views
rotating a sprite with mouse cursor
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 ...
2
votes
2
answers
6k
views
Triggering Enhanced Input Actions via inputs with modifier keys (Shift/Alt/Ctrl) in UE5
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 ...
0
votes
1
answer
318
views
Mouse input accumulates different number points at different frame rates
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 ...
0
votes
1
answer
581
views
Unity detect drag to a game object
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 ...
3
votes
1
answer
384
views
How Can I Match the Windows Cursor Latency with a DirectX Rendered Cursor?
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 ...
1
vote
2
answers
1k
views
How to make a collision object within a viewport detect mouse inputs?
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 ...
0
votes
0
answers
224
views
Player rotation using relative mouse movement instead of absolute
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. ...
1
vote
1
answer
343
views
How to implement a dial control that snaps to increments?
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 ...