playMaker

Author Topic: Newbie help with modifying ClickToMove behaviour [SOLVED]  (Read 2470 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
Newbie help with modifying ClickToMove behaviour [SOLVED]
« on: July 24, 2013, 06:13:46 PM »
Hi,

I've been created a scene based around the ClickToMove demo from the PM samples, and I was wondering how I would go about restricting valid clicks to a specific tagged object?

E.g. I only want the player cylinder to move if the mouse was clicked on the floor plane - not to any other object, like it currently does. (even if the object is in mid-air).

Any pointers?

Thanks in advance...
« Last Edit: July 24, 2013, 08:09:37 PM by jess84 »

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
Re: Newbie help with modifying ClickToMove behaviour
« Reply #1 on: July 24, 2013, 06:42:58 PM »
Hi there,

I haven't used the playmaker samples so I don't know exactly how it's done on there, but this certainly sounds like the kind of thing you would use tags and/or layers for (dependent on how you did it).

If you are using the 'mouse pick' action to listen for the mouse click, then you would set the floor into its own layer and set the 'Layer Mask' within the mouse pick action to be that of the floor. That way the action will only get fired when the floor is clicked.

Hope this helps!

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Newbie help with modifying ClickToMove behaviour
« Reply #2 on: July 24, 2013, 08:09:17 PM »
Awesome, thanks... worked first attempt, which kinda surprised me based on previous unity/PM tinkering!