Page 1 of 1

Moving mouse instant by precise amount in-game

Posted: Sat Aug 13, 2016 7:36 am
by Majestic-3
I'm looking for a way to move my mouse in-game (move my view/aim/camera in fps game) by certain amount when pressing certain key. It's crucial for it to be precise and instant/next to instant.

Any suggestions?

Re: Moving mouse instant by precise amount in-game

Posted: Sun Aug 14, 2016 3:51 am
by zelmon64
Majestic-3 wrote:I'm looking for a way to move my mouse in-game (move my view/aim/camera in fps game) by certain amount when pressing certain key. It's crucial for it to be precise and instant/next to instant.

Any suggestions?
The following makes the mouse go right when the "A" key is pressed:

Code: Select all

if keyboard.getPressed(Key.A):
	mouse.deltaX = 1

Re: Moving mouse instant by precise amount in-game

Posted: Tue Aug 16, 2016 1:10 am
by CyberVillain
There will always be sync issues though, it will drift