Sie sind nicht angemeldet.

1

Dienstag, 7. Dezember 2021, 12:38

How to control the transparency for an hotspot group

Hi to all!
I'm really a beginner, so sorry for my question:


I've learn through the forum how to "group" some hotspot and I've learn also how to control the transparency (in relationship to the point of view) of a single hotspot using this code:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<settings transparent_angle="25"/>
  <events name="transparent_active" keep="true" onviewchanged="transparent_active"/>
  <action name="transparent_active" scope="local">
	getlooktodistance(current_angle, hotspot[logo].ath, hotspot[logo].atv);
	clamp(current_angle, 0, get(settings.transparent_angle));
	set(current_angle_90, calc( current_angle * (90 / settings.transparent_angle) ));
	set(current_angle_90_rad, calc( current_angle_90 / 180 * Math.PI ));
	if(current_angle_90 LT 90,
  	Math.cos(transparent_coeff, current_angle_90_rad);
  	,
  	set(transparent_coeff, 0);
	);
	set(hotspot[logo].alpha, get(transparent_coeff));
	trace(hotspot[logo].alpha);
  </action>


Now I need to modify that code in order to control an hotspot group...Someone could help me?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »GIOLETS« (7. Dezember 2021, 17:50)