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

Q&A about the latest versions
Post Reply
Kai
Posts: 2
Joined: Tue Sep 11, 2018 12:15 pm

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

Post by Kai » Sun Sep 16, 2018 7:59 pm

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

User avatar
Hopki
Gnome
Posts: 8454
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

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

Post by Hopki » Sun Sep 16, 2018 10:52 pm

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 30 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 30 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

Kai
Posts: 2
Joined: Tue Sep 11, 2018 12:15 pm

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

Post by Kai » Mon Sep 17, 2018 1:16 am

Hi Hopki,

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

Best regards, Kai

Post Reply

Who is online

Users browsing this forum: 360Texas and 16 guests