Hi everyone & once again thanks to UT for the new UI system.
Today, I’ve tried modifying the UI source (namely PointerInputModule) to support different mouse position than the default “Input.mousePosition”, because I need to set sensitivity to my cursor. I’ve got Screen.lockCursor set to true, so the Event System could not recognize my custom cursor hovering around. Thus…
This is the code I’ve added, then I’ve replaced all occurrences of Input.mousePosition for MousePosition.mousePosition, built the solution and imported the dll’s. The code works, and I think it can be useful to others, possibly the concept can be integrated into the UI system.
Do you guys think it is a good solution? Thanks, and enjoy ![]()
public static class MousePosition {
//our own mouse position we can modify from our own scripts
static Vector2 _mousePosition;
public static Vector2 mousePosition
{
get
{
return _mousePosition;
}
set
{
_mousePosition = value;
}
}
}