HGE::Input_SetMousePos

Sets current mouse cursor position.

void Input_SetMousePos(
  float x,
  float y
);

Parameters

x
X-coordinate of the new mouse cursor position.
y
Y-coordinate of the new mouse cursor position.

Remarks

You could use Input_SetMousePos to receive relative mouse movement. Just store the coordinates obtained with Input_GetMousePos, then return mouse cursor to the center of the screen and use the difference between current and the last coordinates as relative values.

It is not recommended to use Input_SetMousePos for visible cursor movement as this could be confusing for the user.

Requirements

Header: hge.h
Import library: hge.lib

See also

Input_GetMousePos