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

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
FNagy
Posts: 2
Joined: Fri Nov 08, 2013 10:19 pm

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

Post by FNagy » Thu Nov 21, 2013 5:37 pm

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.
Last edited by FNagy on Fri Nov 22, 2013 11:14 pm, edited 1 time in total.

User avatar
Hopki
Gnome
Posts: 9082
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

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

Post by Hopki » Thu Nov 21, 2013 11:18 pm

Hi,
I have moved this to the Action Script forum as it's more relevant to this forum.
Regards,
Hopki

FNagy
Posts: 2
Joined: Fri Nov 08, 2013 10:19 pm

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

Post by FNagy » Thu Dec 05, 2013 10:56 pm

Hey devs, this is probably not a very complex question, is it?

User avatar
thomas
Site Admin
Posts: 2495
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

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

Post by thomas » Mon Dec 09, 2013 5:42 pm

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.
MfG, Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest