You are not logged in.

1

Monday, November 5th 2012, 12:03am

Hotspots on Video Panoramas

Hi,
I would like to add hotspots to a video panorama. The hotspots should stay at the same position in the video and not "follow" the user arround.
At the moment I am having an infinite loop that checks the played time of the video every 0.2 seconds and then decides if the hotspot is visible (I defined a start and end time / 0 and 10) and also updates the ox attribute of the hotspot to adjust the position of the hotspot to the current position in the video.

Source code

1
2
3
4
5
6
7
8
9
10
11
<action name="keyframe">
  add(hotspot[spot].ox, '4'); 
  trace(get(hotspot[spot].ox));
  if(time GT 0, 
    if(time LT 10, 
       trace('show spot'); set(hotspot[spot].visible, true);, <!-- true -->
       trace('hide spot'); set(hotspot[spot].visible, false); <!-- false -->  
    );
  );
delayedcall(0.2, keyframe); 
</action>

My problem is that the hotspot is stuttering because of the adjustment.
Is the general idea okay? or did I miss a hotspot attribute to set for this task? Did anybody already do this or has an advice how to solve this?

Thanks a lot,
Sven

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

2

Monday, November 5th 2012, 2:15am

Hi!
few errors

add(hotspot[spot].ox, '4');
must be
add(hotspot[spot].ox,4);


delayedcall(0.2, keyframe);
must be
delayedcall(0.2, keyframe(); );




Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

3

Saturday, November 17th 2012, 4:36am

Thanks