Page 1 of 1

Object2VR:Test hit of hotspot with another object (or point)

Posted: Thu Nov 21, 2013 5:37 pm
by FNagy
Hey guys,

I am loading an object2vr swf into another swf. Once it is loaded, I am creating a custom pointer which should serve as an indicator for the user as it will be probably controlled by Leap Motion or something similar. So no mouse. The problem is that it is impossible to click the hotspot like this, because I do not know when the user is over a hotspot. While you added an on click/mouse over/ etc. listeners to the hotspots (which work alright, of course, if you have a mouse), I would need to retrieve the hotspot "clickable area" and hittest it with my custom pointer sprite. Once there is a hit and the user makes a "tap", I can call some function.

So the question is: How can I retrieve the hotspot sprite/displayobject? What is its path? What object is it? I really need that reference...

Thanks a lot!

EDIT: Changed the title as this thread was moved to the AS forum.

Re: Test hit of hotspot with another object (or point).

Posted: Thu Nov 21, 2013 11:18 pm
by Hopki
Hi,
I have moved this to the Action Script forum as it's more relevant to this forum.
Regards,
Hopki

Re: Object2VR:Test hit of hotspot with another object (or po

Posted: Thu Dec 05, 2013 10:56 pm
by FNagy
Hey devs, this is probably not a very complex question, is it?

Re: Object2VR:Test hit of hotspot with another object (or po

Posted: Mon Dec 09, 2013 5:42 pm
by thomas
Hello,

What kind of hotspot are you using?

- Point hotspots are just Sprites (if I remember correctly), but I am not sure if it is (currently) possible to get a reference with the API
- The hit test for polygon hotspots is done in code, so we don't rely on Flash objects.
- An area hotspot is a internal bitmap and the color represents hotspots ID. The hit test is also done in software.