Slide-Out Panel Animates on Button - How to Animate on Swipe Motion on Mobile?
Hi, I've looked into many scripts and even bought an asset that I'm not sure how to assign for my needed function.
This is an audio app that has a slide-in effects panel that comes up from the bottom (Animation) when the tab of the panel (always idly revealed at bottom) is pressed, activating a button that initiates the animation. Another button exists to hide the panel, by animating the slide back down/out.
I'm looking for a relatively simple way to convert or add a swipe function for this panel or its button.
I'm sorry, but I don't even have scripting for this question because I am not utilizing any for it yet.
Thanks.
Answer by panoramabeats · Aug 15, 2017 at 06:56 AM
Well for those looking, Here's a workaround I found, based off a comment I found elsewhere (Someone was looking to make an Unlock Slider like on your mobile)
The workaround is to use a slider!
I made a slider and stretched out the body to match the tab of the panel, and assigned it to the same boolean that my button was assigned to, that initiates the animation. With the values set from 0 to 1, it's like an on/off switch.
Make it invisible by using transparent sprites in the slider, and the tab becomes a slide out tab by swipe!