Pathirana Posted November 14, 2022 Share Posted November 14, 2022 When hover the text from left to right need to rotate image slightly with mouse position. Currently it moves horizontally. Any Suggestions for this. Effect same as the work section in this link - https://thefluid.webflow.io/ See the Pen GRGEraY by pramith (@pramith) on CodePen Link to comment Share on other sites More sharing options...
Pathirana Posted November 14, 2022 Author Share Posted November 14, 2022 Effect same as the work section in this link - https://thefluid.webflow.io/ Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted November 15, 2022 Solution Share Posted November 15, 2022 Hi @Pathirana and welcome to the GreenSock forums! What you can do is check the mouse position in the X axis and create a GSAP animation for each image that rotates the image from a starting angle to an end angle. Then you can control that animation's progress using the mouse position value. Here is a simple example illustrating that: See the Pen jOKLNLG by GreenSock (@GreenSock) on CodePen Hopefully this is enough to get you started. Let us know if you have more questions. Happy Tweening! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now