Page 1 of 1

Non Button data — Pano interaction

Posted: Wed Nov 16, 2016 5:26 pm
by Shenanigans
Wondering if there is a way to trigger/set a variable by mouse interaction without having to use a hotspot or button.

I want to be able to create elements that fade out if the scene isn't being engaged, and when it does get interacted with, visual elements return.

Just like it does in this example.
https://artsandculture.withgoogle.com/e ... point-tour

Any ideas would be appreciated.

Thank you.
-d e o n

Re: Non Button data — Pano interaction

Posted: Thu Nov 17, 2016 12:08 pm
by Hopki
Hi d e o n,
This would be done with a variable and timer.

Click anywhere in the blank canvas of the skin editor and add a variable, example: show_elements => True/False => true.
Add a timer to the skin.
1.jpg
1.jpg (15.39 KiB) Viewed 1957 times
Set the timers properties to:

Timeout, say 5 seconds
Type, Player inactive
Repeat , One time

Then give the timer the actions.

Source: Deactivate
Action: Set Variable Value
Variable Name: show_elements
Operation: Set(=)
Value: false

Source: Activate
Action: Set Variable Value
Variable Name: show_elements
Operation: Set(=)
Value: true


Now any elements that you want to fade out set a logic block under its Alpha.
2.jpg
2.jpg (29.5 KiB) Viewed 1957 times
Click to open logic block and set the following:
3.jpg
3.jpg (55.37 KiB) Viewed 1957 times
What will happen is the project will open with the elements visible. If no interaction is made, after the timers, timeout vale the elements that have the Alpha logic block set will fade out to Alpha 0.2. As soon as you interact with the Pano they will return back to Alpha 1.00.

Of course you can use the same logic block under a position logic block, so when elements fade out some can slide off screen.
Regards,
Hopki

Re: Non Button data — Pano interaction

Posted: Mon Nov 21, 2016 5:35 pm
by Shenanigans
Thank you for the reply.