Page 1 of 1

How to auto-hide an object on skin if window is smaller than 800px

Posted: Sun Sep 16, 2018 7:59 pm
by Kai
Hi everyone, I am new in this forum and I try to collect first experiences with Pano2VR. Right now I got stuck with the following problem:

I created a floor plan and placed it on the skin editor. I would like it to disappear if the window becomes less than 800 pixel.

I tried to add a class and to include a custom CSS-file to set this class to "display:none;" but this way it doesn’t work…

Can anybody help?

Thx, Kai

Re: How to auto-hide an object on skin if window is smaller than 800px

Posted: Sun Sep 16, 2018 10:52 pm
by Hopki
Hi Kai,
Select the visible logic block:

Screen Shot 2018-09-16 at 21.46.10.png
Screen Shot 2018-09-16 at 21.46.10.png (52.76 KiB) Viewed 1403 times

Then add:

Screen Shot 2018-09-16 at 21.45.37.png
Screen Shot 2018-09-16 at 21.45.37.png (97.82 KiB) Viewed 1403 times

So when the player width is equal to and less than 800, visible false.
You can do the same with the scale logic block

As an example under the scale logic block:

Player Width, <= 1024, scale 0.8
Then under the visible logic block hide it at 800.

Sp at 1024 width it scales then at 800 it hides.
Regards,
Hopki

Re: How to auto-hide an object on skin if window is smaller than 800px

Posted: Mon Sep 17, 2018 1:16 am
by Kai
Hi Hopki,

thank you very much. I was searching for s.th. like the "logic block"... Great, it works!

Best regards, Kai