Jump to content
Search Community

Follow my mouse ...

mikel test
Moderator Tag

Recommended Posts

Hey,

 

OSCAR should be transferred to the new world of GSAP 3.0.
So far so good. But OSCAR does not change the side if HE is in the corresponding area of the window.
What am I not doing the way it should be?

 

See the Pen ExabOrJ by mikeK (@mikeK) on CodePen

 

Kind regards

Mikel

 

The gsap 2 version

 

See the Pen ZMZEeV by mikeK (@mikeK) on CodePen

Link to comment
Share on other sites

I assume it's because you've got a quickSetter() that's setting the "x" and "y" directly, and then you're ALSO creating a tween in a "mousemove" that's trying to make x/y go to other values instead. x and y can only be one value at a time :)

 

Maybe you should create a wrapper and then just tween the inner element to control the relative position (side flipping), and the container for the overall position. 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...