Hope someone can help!
I've been scratching my head over this for days. I want to fade in a hotspot (simple label, png image) to fully opaque when it's at the centre of the user viewing direction, and then fade out to zero as they move either left or right. Using the onviewchange event. Ideally, there would be some sort of "factor" involved as a variable, so that if you move say 30 degrees to the left, if fades to zero as you hit 30, and 30 degrees to the right, also zero as you reach 30. Hope this makes sense!
<events onviewchange="continuous_tracking();" />
<action name="continuous_tracking">
if (view.hlookat LT 0,
calc(labelAlpha, (view.hlookat * -1) / get(hotspot[label-breakout].ath) );
,
calc(labelAlpha, view.hlookat / get(hotspot[label-breakout].ath) );
);
trace(labelAlpha);
set(hotspot[label-breakout].alpha, get(labelAlpha));
</action>
Any input greatly appreciated!
Tim