playMaker

Author Topic: I can't store UI elements with mouse pick..  (Read 1670 times)

Vâel

  • Playmaker Newbie
  • *
  • Posts: 7
I can't store UI elements with mouse pick..
« on: October 16, 2017, 06:13:45 AM »
Hey everyone,

I am trying to store UI element with "Mouse pick" action but it always stores other objects like plane, cubes..

Any suggestion or solution to fix that?

Regards

Vael


omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • My Prototypes
Re: I can't store UI elements with mouse pick..
« Reply #1 on: October 16, 2017, 12:10:33 PM »
Hello Vael,

You could try to use the LayerMask option in the MousePick action. Set it to 1 then  Choose UI for the Element 0, that should only allow your mouse pick to affect any gameobject with the UI layer applied.

Tri Nguyen
Tri Nguyen
Game Designer at Nvizzio Creations

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I can't store UI elements with mouse pick..
« Reply #2 on: October 17, 2017, 02:33:24 AM »
Hi,

Did you manage to make this work?

 bye,

 Jean

Vâel

  • Playmaker Newbie
  • *
  • Posts: 7
Re: I can't store UI elements with mouse pick..
« Reply #3 on: October 17, 2017, 05:11:27 AM »
Hey omgitstri and jeanfabre,

I tried it, but it didn't work. When I use layer mask for UI, it doesn't store any object not planes, cubes but also not any UI elements. I set all Canvas and it's all children to UI layer.

I can only store 2d sprites(I add 2d collider component) as game object but it does not work with Screen Space-Overlay and does not show up in scene if I use any Background for canvas.

I am trying few methods, I hope I can handle it...

I can try second camera with Screen Space-Camera for UI but background problem will occur again..

Best Regards,

Vael

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • My Prototypes
Re: I can't store UI elements with mouse pick..
« Reply #4 on: October 18, 2017, 10:31:52 AM »
Hello Vael,

Maybe you can try this action "Get Last Pointer Data Info"? I used it for an inventory system to drag items from one slot to another and it works quite well. I have my FSM set up so that when I click on the UI, I save the gameobject in the 'Pointer Enter' of the action.

Tri Nguyen
Tri Nguyen
Game Designer at Nvizzio Creations