playMaker

Author Topic: Canvas + pick mouse event for Raw Image (ui button)  (Read 2322 times)

xanxion

  • Playmaker Newbie
  • *
  • Posts: 3
Canvas + pick mouse event for Raw Image (ui button)
« on: February 21, 2017, 12:50:03 PM »
Hello guys,

I've been helping a friend out in Playmaker, since its a bit similar to Construct 2.
He wanted me to implement a couple of ui buttons (i used raw image in a canvas)
i added a trigger collider to the raw image, and then tried to:

Mouse pick event
- Mouse over = go to next state and change color.

However, the mouse doesn't seem to register when i hoover over the raw image icon in the canvas overlay.

Do i need a whole differen approach?

Im actually considering getting unity and playmaker myself. It's a very cool system so far!

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: Canvas + pick mouse event for Raw Image (ui button)
« Reply #1 on: February 21, 2017, 04:41:28 PM »
xanion if you download the playmaker samples from this page http://www.hutonggames.com/samples.php   there is one called "3 buttons" that will show you the basics

xanxion

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Canvas + pick mouse event for Raw Image (ui button)
« Reply #2 on: February 23, 2017, 04:31:23 AM »
I tried implementing it, but that didn't quite work out.

I would like to use canvases so i can easy disable or activate them. And they are a bit easier to work with.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canvas + pick mouse event for Raw Image (ui button)
« Reply #3 on: February 23, 2017, 05:40:22 AM »
Hi,

 yes, I would try to sanitize it.

 I don't think the raw image is the problem but rather the mix of 3d colliders and uGui stuff.

 I actually just posted on this, and then saw your post :) you can can have the uGui eventsystem to work with regular 3d and 2d collider,s you need to have a physicsRaycaster component on the canvas, not just a graphicsRaycaster.

 Let me know how it goes.

Bye,

 Jean