playMaker

Author Topic: Cursor goes outside of the game window/screen  (Read 138 times)

kwint

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Cursor goes outside of the game window/screen
« on: May 20, 2020, 05:49:15 PM »
Hi all !

Here is my problem: when I test my build (windows standalone), the cursor does not lock at the limits of the application, whether in full screen or windowed.

For example in fullscreen, using a 2 screens setup, the cursor goes to the other screen when the user exceeds the limits of the game window.

Is there a way to keep the cursor inside the game window ?

Thanks in advance for your help !

kwint

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Cursor goes outside of the game window/screen
« Reply #1 on: May 21, 2020, 07:00:50 PM »
I have tried with "Set Cursor Mode" action set to "Confined to game window" on "Update" with no success.

Also with "Set cursor Lock state" with lock mode on "confined".

I'm really lost with this.

Is there really no way around this problem?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4968
    • View Profile
    • jinxtergames
Re: Cursor goes outside of the game window/screen
« Reply #2 on: May 22, 2020, 01:43:20 AM »
Hi.
Have you tried in a build?
As in editor that might not work.

kwint

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Cursor goes outside of the game window/screen
« Reply #3 on: May 22, 2020, 08:44:20 AM »
Thank you DjayDino for your help.

Yes I have tried in a build with no success.
After many tries, I have found that it work in an empty scene.

But, in my main scene, "set cursor mode" ans set "cursor lock state" don't have any effects event if I try with the "locked to center" fonction.

The only action that is working, is "set mouse cursor", but unfortunatly  it don't have an option to confine the cursor to the game window.
I imagine that in one way or another, I have a script or an asset that conflicts with the management of the cursor. I tried to deactivate each game object one by one, with no results.

So, I'm really lost and don't know how to do it.

My project is finished and has already been submitted to steam. I only have this little problem ...

Any idea is welcome.





kwint

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Cursor goes outside of the game window/screen
« Reply #4 on: May 23, 2020, 04:30:11 PM »
Well, I have been able to make  the action "set cursor mode" to work properly by deactivating "control mouse cursor" on the PlaymakerGUI gameobject, wich seems a little weird to me ?

Anyway, maybe this will help some of you guys in the future.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4968
    • View Profile
    • jinxtergames
Re: Cursor goes outside of the game window/screen
« Reply #5 on: May 24, 2020, 12:25:47 AM »
Hi.
That settings should not interfere when making a build.
Did you have to do that setting to make it work in build or only in editor?

kwint

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Cursor goes outside of the game window/screen
« Reply #6 on: May 24, 2020, 09:53:01 AM »
Hey DjayDino,

I have to uncheck "control mouse cursor" in playmakerGUI to make it work in build.

In editor, confine cursor to game window never worked but locking the cursor to the center of the screen worked with the same settings.