Share Posted June 17, 2022 I want to create sort of an "impact effect" on my house image when the sold image finishes it's animation. I don't know how to describe it properly but I would like both the images to shake a little if that makes sense. I tried animating margin but it looked janky. See the Pen Jjpzzqv by Aizazulhaq (@Aizazulhaq) on CodePen Link to comment Share on other sites More sharing options...
Share Posted June 17, 2022 Hey there Aizy! Just a gentle request not to tag people for help. All the forum questions will get answered - tagging people just adds pressure on people who are volunteering their time. Maybe customWiggle will give you the effect you're after? It's a Club GreenSock perk but you can use it for free on codepenhttps://greensock.com/docs/v3/Eases/CustomWiggle 4 Link to comment Share on other sites More sharing options...
Author Share Posted June 17, 2022 @CassieI'm sorry it wasn't the intention behind tagging you in the post. I'm new around here and bringing in my bad habits from Reddit. I'll be more considerate from now on. Thanks for the help, I used TweenMax and animated the rotation. which is close enough to what I want. Link to comment Share on other sites More sharing options...
Share Posted June 17, 2022 Yep, if you're okay with a less refined "shake" (CustomWiggle is super smooth), you could use keyframes, like: gsap.to("#id", { keyframes: { rotation: [10,-8,6,-5,3,-1,0] }, duration: 1 }); Just an idea. 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