Page 1 of 1

Disable Mouse Wheel in selected nodes

Posted: Wed Aug 05, 2020 1:54 pm
by Hopki
Following a Facebook User Group request please find attached a component that will disable the mouse wheel zoom but for selected nodes.

Download and double click to add the component to Pano2VR.
The component works by detecting the tag "disable".

Once the component is added to your skin just tag each node using the User Data panel that should not have mouse wheel interaction with "disable", without the quotes.

Screenshot 2020-08-05 at 12.50.13.png
Screenshot 2020-08-05 at 12.50.13.png (7.52 KiB) Viewed 12300 times

Under the hood for those that want to know:
The component uses two Node Changed, Go To URL actions in a container, the URLs are JavaScript calls.

Code: Select all

javascript:player.setLockedWheel(true)
This disables the mouse wheel.

Code: Select all

javascript:player.setLockedWheel(false)
This enables the mouse wheel.

Both actions use an action filter that checks the tag of the node.
For the deactivate mouse wheel action the action filter is: Tags, contain, disable

For the activate mouse wheel action the action filter is: Tags, not contain, disable

Regards,