mrtsrds Posted August 18, 2022 Share Posted August 18, 2022 Hello, might anyone know why the cursor is is tweening only on the last element and not on the first two, i have added a for each loop on the targeted elements but yet only works on the last one. I think it might be the if condition although it is giving true outcomes. See the Pen bGpWmXd by nikhil-ladhani-nl (@nikhil-ladhani-nl) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted August 18, 2022 Share Posted August 18, 2022 Hi I've just noticed that this is just a copy of an old post and someone else's demo on an older thread - it's already been answered by Blake in 2020 Please don't do this - it's a huge waste of everyone's time. Link to comment Share on other sites More sharing options...
Solution mrtsrds Posted August 18, 2022 Author Solution Share Posted August 18, 2022 2 minutes ago, Cassie said: Hi I've just noticed that this is just a copy of an old post and someone else's demo on an older thread - it's already been answered by Blake in 2020 Please don't do this - it's a huge waste of everyone's time. Yes I know. But that issue has not been resolved. That's why I opened a new topic. I found the solution to the problem. You can review below. if (distance.y > hypotenuse || distance.x > triggerDistance) { return; } if (distance.x > hypotenuse || distance.y > triggerDistance) { return; } 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