View Dependent fading in

  • Hi everyone,
    currently I have to
    do the following - 4 or 5 different buttons should be faded in depending on the current horizontal view angle. So between 35°- 75° Button A should be visible, between 95° - 105° Button B should be visible and so on. If possible the buttons should be faded in via the tween-function.
    So far I could only achieve this effect for one button via 2 nested if-actions. But for 2 or more buttons this isn't working for me properly.
    Could you give me some pointers to how this should be possible?

    Any advice is highly apreciated.

    Kind Regards

    Christian

  • Need add in you layer bthi="0"
    regards


  • Hi danimorgo,

    thanks for your help! Currently I got this:

    Code
    if(Winkel GT 25, 			if(Winkel LT 50,set(layer[Haus_B].alpha,1),set(layer[Haus_B].alpha,0););			,set(layer[Haus_B].alpha,0);)


    This works fine, as expected. But if I add another button like this:

    Code
    if(Winkel GT 25, 			if(Winkel LT 50,set(layer[Haus_B].alpha,1),set(layer[Haus_B].alpha,0););			,set(layer[Haus_B].alpha,0);)
    			if(Winkel GT 100,			if(Winkel LT 120,set(layer[Haus_A].alpha,1),set(layer[Haus_A].alpha,0););			,set(layer[Haus_A].alpha,0);)


    The second button gets completely ignored. If I put it into a seperate action and call both actions on viewchange it works. Why does the second button get ignored?

    Also it is possible two combine two arguments instead of nesting two if's? And how do I format my code in the forum properly? Sry for newbie questions. *unsure*


    Kind regards

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!