Moving mouse instant by precise amount in-game

Official forum for open source FreePIE discussion and development.
Post Reply
Majestic-3
One Eyed Hopeful
Posts: 1
Joined: Sat Aug 13, 2016 5:19 am

Moving mouse instant by precise amount in-game

Post 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?
User avatar
zelmon64
Cross Eyed!
Posts: 134
Joined: Thu Apr 09, 2015 4:27 am

Re: Moving mouse instant by precise amount in-game

Post 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
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Moving mouse instant by precise amount in-game

Post by CyberVillain »

There will always be sync issues though, it will drift
Post Reply

Return to “FreePIE”