I'm trying to get the position of the cursor by calling the mouse class and using the GetState method but the return value is always 0,0. I've searched everywhere and all the code looks the same on other examples. I've tried alternative ways of declare the class but I get the same results.
public void Update() {
var ms = Mouse.GetState();
cursorPos = new Vector2(ms.X, ms.y);
}
If you are using Mono, it's possible that
Mouse.GetState
method is extended. On some past versions there was problemsMouse.SetState
method, could be that also problem was also inMouse.GetState
... so I suggest you take latest Mono framework.Or you can try to access directly to that method.