How can I hide and lock my cursor position?

#1

Hi everyone. I’m making a first person shooter to try and learn Armory 3D. I’m moving here from the Blender Game Engine. My first project will be a sequel to my first Blender Game Engine game called Undead Fields. I just have a problem with the cursor. It moves normally so I cannot turn my character much and I cannot figure out how to fix this. Can anyone help? I basically just need my cursor locked to the center and then hidden. (By the way I don’t know any Haxe yet or Krom so I’ll need some help if that’s all necessary.) Thank you! :slight_smile:

2 Likes

#2

If you are using nodes, then you can use this


Show mouse-> Visibility of mouse, checking it will show mouse, unchecking it will hide mouse.
Mouse Lock-> Locking mouse to game window area, checking it will lock mouse to window area, unchecking it will unlock mouse.

4 Likes

#3

thx mate very helpfull

0 Likes

#4

In haxe you can lock and unlock the crusor with:

iron.system.Input.getMouse().lock();
iron.system.Input.getMouse().unlock();

1 Like