playMaker

Author Topic: Mouse Pick Event Object (Only one Object)  (Read 1655 times)

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Mouse Pick Event Object (Only one Object)
« on: April 14, 2019, 03:20:08 PM »
Hi guys!

I have two objects on the scene, both have the action mouse pick event object.

The problem:
When I click an object it's send an event (this is ok), but if I click fast on two objects it's send two events.
My app is for mobile, obvious with the mouse it's almost impossible to do this.

Question:
There is a way to avoid this? What's the best practice?
Disable the other FMS?
Disable multitouch? (I don't know how to do)
Other way to pick an object and send an event with same type of single click?

Best!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mouse Pick Event Object (Only one Object)
« Reply #1 on: April 14, 2019, 04:29:42 PM »
Hi.
Maybe use 'Mouse Pick' instead.

You can use layers to limit the pick only to certain layers (object that can be picked)
Then you can send a event to that object and set a delay, or you can let the object send a event back when done (this depends on your setup)

To send a event back you can use 'Set Fsm Game Object' to give a reference to the selected objectm where you should send the event to.

You will have to use 'Send Event By Name'

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Mouse Pick Event Object (Only one Object)
« Reply #2 on: April 14, 2019, 07:21:52 PM »
DJ thanks for your reply!

But I have some questions.
What’s the diferences between mouse pick and mouse pick event?
Mouse pick event have the mask layer too, works equal?

Thanks again

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Pick Event Object (Only one Object)
« Reply #3 on: April 15, 2019, 02:46:11 AM »
Hi,

 MousePick and MousePickEvent are somewhat different in their approach, mousepick lets you define the depth of the pick for example, while mousePickEvent gives you more info as to the current state of the pick ( over, down, up exit)

 So you need to choose the one that suits your needs, that's all.

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mouse Pick Event Object (Only one Object)
« Reply #4 on: April 15, 2019, 06:22:32 PM »
Hi.
As far as i know, there is also a difference in performance if you have many objects to interact with.

I remember making this tutorial for someone but i can't find the post.