playMaker

Author Topic: Mouse Over not reliable?[SOLVED]  (Read 3734 times)

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Mouse Over not reliable?[SOLVED]
« on: July 01, 2014, 11:31:52 AM »
Hello, I'm in desperate need of some help.

I need my character to be able to pick something up while looking at it. The function I'm using now is terrible (Mouse Over) it's not responding half of the time I click the mouse and it is extremely frustrating. Is there another function I could use?

Something centered, at the camera, it knows that the player is looking at it, click -> attach object to my node. Mouse Over is not an option

Thanks in advance.
« Last Edit: July 02, 2014, 12:15:49 AM by jeanfabre »

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #1 on: July 01, 2014, 11:39:22 AM »
Here's an Image that shows how the objects is set up. Like I said Mouse Over / Mouse Exit does not work properly.

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Mouse Over not reliable?
« Reply #2 on: July 01, 2014, 11:53:36 AM »
From the look of your flow, it never transitions back to your Wait for MouseOver state.

Regardless, you should look at using Global Transitions rather than that initial state.  E.g. on your 'Highlight and Check for Click' state.  Right click on that state, click Add Global Transition, then System Events, then MouseOver.

(That may not solve your problem, but it'll mean far less states on your FSMs)
« Last Edit: July 01, 2014, 11:56:11 AM by jess84 »

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #3 on: July 01, 2014, 12:09:30 PM »
From the look of your flow, it never transitions back to your Wait for MouseOver state.

Regardless, you should look at using Global Transitions rather than that initial state.  E.g. on your 'Highlight and Check for Click' state.  Right click on that state, click Add Global Transition, then System Events, then MouseOver.

(That may not solve your problem, but it'll mean far less states on your FSMs)

Thanks, but Mouse Over still only registers half of the time. It Switches between the two states super fast. It acts like the mouse is over and not over...? I have no idea why but I just need something simple, something that knows where my crosshair is

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Mouse Over not reliable?
« Reply #4 on: July 01, 2014, 12:42:38 PM »
Does that still occur if you simplify it to just 3 states, and use Global Transitions?  Like this... (see attachment)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Over not reliable?
« Reply #5 on: July 01, 2014, 12:43:41 PM »
Hi,
 
"MOUSE OVER" is a built in Global event and as such can not be declared several time in an fsm. Only one of them will be called, and not related to the active state ( that's my experience of it at least),

So, only have one "MOUSE OVER" as a global transition of one state only, and things are going to be a lot more predictable.

 Bye,

 Jean

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #6 on: July 01, 2014, 12:55:48 PM »
I've tried everything but nope, the 2 states still flickers between one another. It reacts like the mouse centered on my camera moves around or something (it doesn't). But is it really necessary to use something involving the mouse cursor? Is there no other option really?

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Mouse Over not reliable?
« Reply #7 on: July 01, 2014, 01:19:05 PM »
So you changed it to how my screenshot showed and it was still not working?

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #8 on: July 01, 2014, 01:23:54 PM »
So you changed it to how my screenshot showed and it was still not working?

No, I can't use Mouse Over at all I need something else.

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #9 on: July 01, 2014, 01:29:53 PM »
Hold on a second. I'm using the Ultimate FPS Camera, seems like something is fighting over the cursor? That's why it switches between the two states all the time...

reelife

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Mouse Over not reliable?
« Reply #10 on: July 01, 2014, 04:29:32 PM »
Solved it. I added an empty Gameobject to the camera, centered it to the exact point of my crosshair and made a new FSM which can be visible below. I started doing some research on how the gravity gun works in Half Life 2 and figured out a simple solution.