OMG - Can You Figure This Out?

Aaaarrrgggg... just spent hours over the last week trying to solve moving ML5 tracking into createjs as an alternative to the mouse like we did with the raycasting in three.js for TextureActive. It was almost there but not triggering rollover. I would put in raw windows mouse position and it did trigger rollover, I compared x and y numbers and they were the same, etc. and just could not figure it out... maybe we left something out that worked with TextureActive - which still has a mouse... raw windows has a mouse... ML5 was just data so was using a circle to show where the cursor was... what was it!? Typing it out here, it sort of seems obvious... but does anyone know what it was? Why did the ML5 data not trigger the button rollover?

1 Like

no idea.. would be nice if it works ofcourse, can I test the code so maybe ai can give an answer for it .

I had the same issue when we did custom cursors too - but did not think about it because there are so many thing that it could have been like in 4 levels of createjs code, that I just assumed the worst.

I will leave this unanswered for a little longer then tell what it was.

So that is good, making progress now. Still too early to test - figure the launch is three or four weeks away.

I made it working look and test to the zapp

image

Right... we already had that in our example. What we are doing is making it so anything in ZIM works with the cam cursor and pinch for mousedown/tap/click. And we have it working. The question is why wasn't it working when our little cam cursor circle rolled over the button

1 Like

I tried it (link below) and it looks like the circle is acting as a barrier between the mouse and the button. Since the circle follows the mouse, it constantly sits on top of the button, preventing it from detecting the actual cursor I guess. Because of that the button never registers a rollover.

You can fix it by setting .noMouse() on the circle. That tells ZIM to ignore mouse interactions for that object, allowing events to pass through it to underlying elements like the button

Nice - that was it! That tells me a little about myself when I am debugging... I always expect the worst. Sometimes it is something simple. And welcome to the Forum, @Rania

2 Likes

I absolutely know what you mean. I'm the same way, I overcomplicate a situation but it turns out as simple as spelling it triagle instead of triangle :joy:

Thank you!!

2 Likes