Hi all, I'm starting to use gsap now and I'm still trying to learn, I wanted to give a rotation effect on the x and y axes during scrolling.
The problem is that by writing the line of code:
gsap.fromTo(".element", {rotationY: "20deg", rotateX: "20deg", perspective: 500}, {scrollTrigger: {trigger: ".element", scrub: 1, start: "top bottom", end: "bottom top"}, rotationY: "-20deg", rotationX: "-20deg", perspective: 500, duration: 1});
the result is not the desired one, in fact the element seems to bounce and perform the animation in reverse.
I tried to figure out the problem but couldn't find anything by searching, could you help me?
I'm probably misspelling the values but I can't find any guidance on how to use RotateX and RotateY correctly