playMaker

Author Topic: Problem with MousePickCursor demo scene  (Read 2944 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
Problem with MousePickCursor demo scene
« on: July 08, 2013, 11:10:29 AM »
Hi,

If you add a new (untagged) game object to the scene, one that you don't want to have a cursor change for, the following problem will occur:

1) Hover and move away from the blue cube / logo cube / read cube - Cursor updates fine
2) Hover of the untagged object
3) Hover over the blue cube/logo cube and notice that the cursor does not change.

Any ideas how to fix this?

Edit: This seems to occur if you hover over an untagged gameobject that is the parent of child objects. Doesn't happen if I just create a standalone object.

I've attached a scene file where you can see this problem.  Although as a Unity/PM n00b, apologies if this isn't the correct way of attaching something that can be looked at!  :(
« Last Edit: July 08, 2013, 11:28:33 AM by jess84 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with MousePickCursor demo scene
« Reply #1 on: July 09, 2013, 03:13:20 AM »
Hi,

 can you "package" your scene, that's going to be easier. simply select your scene in the project, and then go to the unity menu "Assets/Export Package", and don't forget to remove the "PlayMaker.dll", you are not allowed to include it for distribution.

I'll then have a look.

bye,

 Jean

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Problem with MousePickCursor demo scene
« Reply #2 on: July 09, 2013, 07:13:54 AM »
Sorry, it's too annoying and time consuming to go through all of the project files and remove the irrelevant ones.

You can recreate this yourself by using the Example Scene, creating an empty prefab, adding 2 child objects (cubes in this case), then adding that to the scene.

Notice how when highlighting one of these new cubes, then the FSM will become stuck in the 'Target Type Change' section. It won't recognise that you're hovering over the any of the 3 original cubes in the demo scene.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with MousePickCursor demo scene
« Reply #3 on: July 09, 2013, 07:35:20 AM »
Hi,

 ok, no worries. Few questions tho.

--  What exemple scene are you refering too? the one you attached? since we can't open it, it's going to be difficult :) or maybe you refer to a playmaker sample scene?

-- What do you mean by "Target Type Change" section, can you do some screenshots maybe, I am at lost to understand where you are within PlayMaker.

I have made a test with a prefab with children having "set Mouse Cursor" action and it all work fine ( with one not having cursor and the other does, etc)

Bye,

 Jean


jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Problem with MousePickCursor demo scene
« Reply #4 on: July 09, 2013, 07:54:22 AM »
As I stated in the original post - MousePickCursor (in PlayMaker Samples > GUI) scene.

Target Type Change is the main state section in your FSM.

I've attached a screenshot, although I am just listing the names that you gave these things.

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Problem with MousePickCursor demo scene
« Reply #5 on: July 09, 2013, 08:04:56 AM »
OK, I've looked at this further.

It causes the problem if the new cube is tagged as something other than 'Untagged' or one of the 3 tags that the FSM is looking for.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with MousePickCursor demo scene
« Reply #6 on: July 10, 2013, 09:11:20 AM »
Hi,

 ok, I see. it's not about the cursor here, it's about dispatching in order to display the right cursor. And indeed there is a flow in the process.

Basically: in "Target Type Changed", instead of checking if "picked" is null, you should simply send the event "PickedNothing", because if the action "Game Object Tag Switch" did not detect any wanted tags, then it means we default.

 I have attached a corrected version.

bye,

 Jean

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Problem with MousePickCursor demo scene
« Reply #7 on: July 11, 2013, 06:52:16 AM »
Awesome. Thanks for that!