Scripting/Client/Functions/SetMouseCursorPos
Moves the cursor (and the real pointer; v0.2.4+). Mouse-look scripts call it with the screen centre after every move.
Syntax
SetMouseCursorPos(x, y)SetMouseCursorPos(VectorScreen)Arguments
- float x
- float y
- VectorScreen value
Example
function onScriptLoad()
{
local pos = player.Pos;
SetMouseCursorPos( pos.x, pos.y );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- BindKey
- UnbindKey
- GetKeyStatus
- ShowMouseCursor
- GetMouseCursorPos
- SetDriveBy
- ToggleCameraMovement
- ToggleMouseMovement
- ToggleWaterShader
- ToggleDynamicShadows
- ToggleBulletHoles
- SetCameraFov
Section: Input
Categories: Client functions | Input