Lock cursor to center of the screen in First Person

Jonathan Santos

New member
Newbie to UPFS. I'm using Playmaker and want to know how to lock the mouse cursor in the center of the screen for my first-person walking sim. I'll have some target graphic to change colors or something to denote that an item is accessible. I'm not a scripter at all, so I help someone can point me in the right direction.. thank you!
 
Just so I understand correctly, are you trying to prevent the player from using their mouse input to move the camera around? (The actual mouse cursor itself does get locked to the centre of the screen when using a first-person view, until you unlock e.g. by pressing ESC in the demo scene.) If that's the case, the quickest way would be to simply set the "Look Sensitivity Multiplier" property in the character's UnityInput component to 0.
 
Thanks Andrew - I zeroed out the vals - same thing. Any other suggestions? Thannk you! Oh, and yes - thats what my desired effect - lock as cross hair or picker to the center of the screen until ecs is hit.
 

Attachments

  • opsive_mouse_center_lock.jpg
    opsive_mouse_center_lock.jpg
    86.1 KB · Views: 3
Hm, I just tested it in the demo scene and setting the Look Sensitivity Multiplier to 0 worked fine. Can you reproduce this in the demo scene? Are you using any states that adjust these input values at all? I'm not familiar with Playmaker so not sure exactly how it would be setting those values, so whilst running in-game keep that inspector window open to make sure that the values are definitely staying at 0 during run-time.
 
Top