playMaker

Author Topic: Lock and Hide Cursor  (Read 2560 times)

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Lock and Hide Cursor
« on: October 04, 2020, 01:55:31 PM »
Hi can somebody help me to hide and lock the cursor in my scene?  I have used the set cursor action and set the bools to true but when i play the scene it still does not work.
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #1 on: October 05, 2020, 06:56:47 AM »
You did it this way and it still doesn't work...?

Can try creating a new scene and trying again.
« Last Edit: October 05, 2020, 06:58:32 AM by BredDev »

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #2 on: October 05, 2020, 10:19:42 AM »
You did it this way and it still doesn't work...?

Can try creating a new scene and trying again.

Hey so yeah i did exactly what u showed and i also just tried to start a new scene and see if it worked but still does not work.
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #3 on: October 05, 2020, 10:59:07 AM »
Did you try creating that new FSM in a new project aswell?

If the mouse is going over the screen and not locking that did the trick for me.

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #4 on: October 05, 2020, 12:28:45 PM »
Did you try creating that new FSM in a new project aswell?

If the mouse is going over the screen and not locking that did the trick for me.

Yeah i guess i will try that i just don't want to start all over on my other fsm, is there a way i can import the other fsm? Like do you know how i would make it a template or something like that for the new project? Thanks for all the help to i really appreciate it.
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #5 on: October 05, 2020, 01:18:21 PM »
No problem. Unfortunately I've never considered making an FSM template, so I wouldn't know how. I ran into this problem a month back when I saved a project, and I downloaded the new unity editor version, my playmaker project wouldn't load correctly.

When I encountered this problem, I selected and copied my whole hierarchy, pasted to a new project file and re-pasted. Everything worked fine guy.

I even went as far as to make a .txt file to let myself know if I encounter problems again. Hopefully this might help you aswell.

Check if there's no MainCameras in your scene you aren't using, if the problem STILL persists, install the AIO Camera Asset (its free) if you haven't already.
« Last Edit: October 05, 2020, 01:20:24 PM by BredDev »

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #6 on: October 05, 2020, 01:46:45 PM »
No problem. Unfortunately I've never considered making an FSM template, so I wouldn't know how. I ran into this problem a month back when I saved a project, and I downloaded the new unity editor version, my playmaker project wouldn't load correctly.

When I encountered this problem, I selected and copied my whole hierarchy, pasted to a new project file and re-pasted. Everything worked fine guy.

I even went as far as to make a .txt file to let myself know if I encounter problems again. Hopefully this might help you aswell.

Check if there's no MainCameras in your scene you aren't using, if the problem STILL persists, install the AIO Camera Asset (its free) if you haven't already.
Okay I will give this a try Thank you!!
The Wolves

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #7 on: October 05, 2020, 02:59:43 PM »
No problem. Unfortunately I've never considered making an FSM template, so I wouldn't know how. I ran into this problem a month back when I saved a project, and I downloaded the new unity editor version, my playmaker project wouldn't load correctly.

When I encountered this problem, I selected and copied my whole hierarchy, pasted to a new project file and re-pasted. Everything worked fine guy.

I even went as far as to make a .txt file to let myself know if I encounter problems again. Hopefully this might help you aswell.

Check if there's no MainCameras in your scene you aren't using, if the problem STILL persists, install the AIO Camera Asset (its free) if you haven't already.
Hey so since i was using the same Unity version i just exported the assets into a package and loaded them into the new project but still the cursor will not lock and hide, this is just odd too me might ne a bug
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #8 on: October 05, 2020, 03:24:28 PM »
I didn't think exporting the project would make a difference, seeing as your bug is still somewhere inside your existing project. That's why I just copy everything and paste into a new project file.

Could you share a screenshot of your FSM view and your hierarchy window? Might be easier to identify the problem because I had this exact same problem as you a month ago...and it too drove me nuts! :P


Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #9 on: October 05, 2020, 04:03:42 PM »
I didn't think exporting the project would make a difference, seeing as your bug is still somewhere inside your existing project. That's why I just copy everything and paste into a new project file.

Could you share a screenshot of your FSM view and your hierarchy window? Might be easier to identify the problem because I had this exact same problem as you a month ago...and it too drove me nuts! :P
By Copying/Pasting do you mean from my file explorer? like just copying and pasting playmaker and my scene into the new project from there?
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #10 on: October 05, 2020, 05:10:13 PM »

By Copying/Pasting do you mean from my file explorer? like just copying and pasting playmaker and my scene into the new project from there?
[/quote]

Yep, thats it. Did you put Translate and GetAxis into your FSM's aswell?

You can circumvent this whole process by installing a pre-made camera controller and just dragging and dropping that into your scene.

https://assetstore.unity.com/packages/tools/input-management/first-person-all-in-one-135316

Give that a download, you can drag and drop the AIO asset into your game and customize camera/movement controls etc, so you don't need all those FSM's.

Comes with a mouse lock/hide cursor function. Can adjust the gravity to your liking aswell.

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #11 on: October 05, 2020, 05:39:51 PM »

By Copying/Pasting do you mean from my file explorer? like just copying and pasting playmaker and my scene into the new project from there?

Yep, thats it. Did you put Translate and GetAxis into your FSM's aswell?

You can circumvent this whole process by installing a pre-made camera controller and just dragging and dropping that into your scene.

https://assetstore.unity.com/packages/tools/input-management/first-person-all-in-one-135316

Give that a download, you can drag and drop the AIO asset into your game and customize camera/movement controls etc, so you don't need all those FSM's.

Comes with a mouse lock/hide cursor function. Can adjust the gravity to your liking aswell.

Okay im going to try both things u mentioned first copying and pasting the folders, but about aio can i still use my fp controller logic on the fsm and just use the camera, is that what u are saying? or do i also have to use the fpc?
But also what do u mean by translate and get axis in the fsm?

The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #12 on: October 06, 2020, 05:30:27 AM »
>but about aio can i still use my fp controller logic on the fsm and just use the camera

Once you install the AIO asset, you won't need to. Think of it is a pre-built controller "Driver" for your character. Everything is setup in the devs script, but in the screenshot i've attached below you only need to worry about adjusting the parameters to your liking. Just drag that blue box into your scene...

Image1: A project I'm currently working on, it has the capsule (Headjoint) and PlayerCamera integrated when you drag that blue box into your scene. That green ball is my MB (MotionBlur) setup I did afterwards, its not included.

Image2: You can adjust the mouse look sensitivity, it even comes with that auto-lock mouse hide cursor I mentioned, stamina bar, jumping parameters...its all there.

Image 3 & 4: Just showing my Post Processing Layer to configure motion blur.
If you want to know how to incorporate that into your AIO camera, this did the trick:


From there, you can even fiddle with more post-processing effects.


I'm more than confident this will sort out your problems with camera, mouse going over the screen, player controller etc...

If not, well then you're shit outta luck   ::)
« Last Edit: October 06, 2020, 05:33:38 AM by BredDev »

Aaron2348

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Lock and Hide Cursor
« Reply #13 on: October 07, 2020, 08:28:58 AM »
>but about aio can i still use my fp controller logic on the fsm and just use the camera

Once you install the AIO asset, you won't need to. Think of it is a pre-built controller "Driver" for your character. Everything is setup in the devs script, but in the screenshot i've attached below you only need to worry about adjusting the parameters to your liking. Just drag that blue box into your scene...

Image1: A project I'm currently working on, it has the capsule (Headjoint) and PlayerCamera integrated when you drag that blue box into your scene. That green ball is my MB (MotionBlur) setup I did afterwards, its not included.

Image2: You can adjust the mouse look sensitivity, it even comes with that auto-lock mouse hide cursor I mentioned, stamina bar, jumping parameters...its all there.

Image 3 & 4: Just showing my Post Processing Layer to configure motion blur.
If you want to know how to incorporate that into your AIO camera, this did the trick:


From there, you can even fiddle with more post-processing effects.


I'm more than confident this will sort out your problems with camera, mouse going over the screen, player controller etc...

If not, well then you're shit outta luck   ::)

Hey thanks for this Aio really helped me out a lot and it is way better then what i had going with Playmaker, it's a really nice fpc and also Thank you for the guide to motion blur u included, very useful information.
The Wolves

BredDev

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Lock and Hide Cursor
« Reply #14 on: October 07, 2020, 08:32:22 AM »
No problem buddy, you're welcome. Enjoy. 8)