Questions tagged [mouse-position]

197 questions
2
votes
1 answer

moving object with mouse but not to the where mouse pointer is

Scene: Hi I'm trying to control the hole along the X and Z axis with using the mouse but don't want the hole moving to the mouse position Plane m_Plane; private Vector3 newmousepos; void Start() { m_Plane = new Plane(Vector3.up,…
RV Binary
  • 23
  • 4
2
votes
1 answer

Trying to set mouse cursor possition in borland C

I have a program which prints the current mouse cursor position into the console. I want to create bounds in which the mouse can go. ( 10,10) and (20,20) So here is my code so far: #include #include #include #include…
Juanti
  • 75
  • 2
  • 10
2
votes
1 answer

C# - Monogame.Forms: Question about getting mouse coordinates

I'm having a problem getting the correct mouse position on the control when moving the camera around. The controler has 800px width and 600px height. Lets only look at drawing method: In here, the only thing I'm trying to do is to draw a line from…
2
votes
2 answers

Javascript rotate image with mouse coordinates

Im using a parallax effect that moves a ball according to the users mouse position (http://webdev.stephband.info/jparallax/index.html). I am trying to figure out a way that the ball will also rotate. So it would appear that as the user moves their…
JB.
  • 893
  • 3
  • 16
  • 29
2
votes
2 answers

Detecting position of mouse click within an image on varied screen sizes - JS/Jquery

I've asked this question before, and the responses told me what I knew I needed to do but didn't provide an example, so I haven't figured out a solution yet. I've got an initial div called "container" which is a height:100% width:100% image of an…
Briz
  • 548
  • 1
  • 9
  • 21
2
votes
2 answers

Can't get mouse position in world space

I started messing around with Unity like a few days ago and I'm no coding expert so pardon me if I'm missing anything obvious. For a few hours I've been trying to draw a line from an object on the screen to anywhere I click in 2D space and failing…
barkin
  • 179
  • 2
  • 12
2
votes
1 answer

Styling individual characters in HTML strings based on mouse position

I am trying to be able to change css properties of individual characters in a string of text based on the proximity to the mouse position. Codepen: https://codepen.io/NewbCake/pen/qYXvoo The idea is to take a string of text and wrap each character…
NewbCake
  • 433
  • 2
  • 7
  • 22
2
votes
6 answers

Python Pygame mouse position not updating

I am trying to implement a game using mouse position to see if the user clicks a button. Somehow the mouse position does not update for a couple seconds, and changes to a new position for another couple seconds, and repeat. I moved and pressed the…
lanlan2271
  • 41
  • 1
  • 4
2
votes
0 answers

Disable Windows battling over the cursor position

I've created an input class from rawinput to able to manage all mouseinputs as I please. However, as I'm going to set the sensitivity the cursor teleports for a microsecond to another location. I can only assume it is due to my cursor sensitivity…
Alex
  • 365
  • 4
  • 17
2
votes
1 answer

Mouse position on 'dragover'

Trying to get mousePosition with object (file), which is dragged from a desktop and later dropped on on my internet browser, but both values i get is "undefined" small html Drag something on body(it is kinda small) and open…
galvakojis
  • 408
  • 1
  • 5
  • 19
2
votes
1 answer

Why GET_X_LPARAM does return an absolute position on mouse wheel?

I override the WndProc method of my Window where I handle Windows messages. LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); In order to get the position of the mouse when I catch the left button down event…
Nick
  • 10,309
  • 21
  • 97
  • 201
2
votes
1 answer

How do I data bind the X/Y coordinates of a radial gradient to the X/Y coordinates of the mouse cursor in Blend?

I'm following this tutorial for how to create a Windows Vista/7 styled glass button in VS Blend (I'm using VS 2013 Community Edition). When it comes to the button shine, I want to re-create how Windows 7 handles buttons on the task bar - as in, when…
Will
  • 3,413
  • 7
  • 50
  • 107
2
votes
1 answer

Determine whether the mouse is over a control? (over a Control pixel range)

I'm trying to write a function that should determine whether the mouse is over a range in pixels (the pixel range of a specific Control) The problem is that the function only works for the bounds of the Form, don't work for buttons or any other…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
2
votes
1 answer

Wrong mouse position in drag and drop inside grid class

I'm basically writing a simple floating panel whose location can be changed via dragging its title bar (which is a grid itself). But I can't get it working! It seems MouseEventArgs.GetPosition returns a wrong point. What am I missing here? public…
SepehrM
  • 1,087
  • 2
  • 20
  • 44
1
vote
1 answer

How to obtain mousewheel information and mouse position together in jquery/javascript

I am using JQuery mousewheel downloaded from https://github.com/brandonaaron/jquery-mousewheel/downloads to obtain mousewheel information. At the same, I want to obtain the position of the mouse when the wheel was rolled. How can I achieve this ? My…
ali gurbuz
  • 190
  • 1
  • 3
  • 14