playMaker

Author Topic: Hide Mouse cursor  (Read 208 times)

Carmichael

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Hide Mouse cursor
« on: October 27, 2017, 07:48:56 PM »
i don't know of someone else has updated this but the one in the ecosystem doesn't work, so i made one

*edit i just updated this action, you can now press backslash "\" to get out of locked cursor mode at runtime and go back in, making editing your scene while playing easy and comfortable.

*updated
« Last Edit: November 02, 2017, 07:26:45 AM by Carmichael »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Hide Mouse cursor
« Reply #1 on: November 02, 2017, 12:00:51 AM »
Hi,

Cool, Thanks for contributing!

odd, I can't find any hidecursor... can you point me to the link online?

also, I would expose the keycode at least so the the use can choose the key that toggles cursor.

 or even better plug it to a fsmbool var which then lets the logic decide of the way to toggle cursor.

anyway, I think you raised a good case, I made two new custom actions to control visibility and lockMode to give you total control over it.

https://twitter.com/JeanAtPlayMaker/status/925980709248012288

Bye,

 Jean
 

Carmichael

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Hide Mouse cursor
« Reply #2 on: November 02, 2017, 01:52:01 AM »
hi Jean, this action basically locks and sets the cursor invincible when the fsm bool is true. but the keycode option is a good idea. i'm probably going to be using your actions since their in the ecosystem, however i'll still add the keycode option like you suggested.

im not sure what link you asked for but this is the api
https://docs.unity3d.com/ScriptReference/CursorLockMode.html
« Last Edit: November 02, 2017, 07:28:13 AM by Carmichael »

obstudio

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Hide Mouse cursor
« Reply #3 on: November 10, 2017, 04:44:31 PM »
hi Jean, is there a possibility to lock cursor in place where it was (not on the center), or mybe there is an action to change position of coursor?