Jump to content
Search Community

nightfury1720

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by nightfury1720

  1. ignore now,I should be doing this: x: '+=' + x, but i was doing x: x. 😭
  2. @mvaneijgen I followed your instruction dumped all of my GSAP logic in useGSAP still facing the same issue, I have a a function called calculate delta which may use getRelativePosition to calculate where I need to move to go to reach my destination, which gives correct response (I have debugged this). The issue lies when i use this response to use gsap.to functionality to reach my destination. (It always send me somewhere else) Cant figure out what i am doing wrong, I am attaching a react playground where I have dumped my code: https://playcode.io/1761482 Pls help
  3. cool @mvaneijgen, have been trying to understand what is the issue since yesterday, tore off a lot my hairs for this. Thanks a lot for your help, let me try implementing that once and see if it works.
  4. I've got some flying blocks that fly in random directions, and I want them to settle down on top of a particular block with the ID "destination". Here's the issue: I'm calculating the offsets between the destination block and the flying block, subtracting these to determine the distance needed to reach the destination. When I trigger the function that moves the flying block on top of the destination after starting the animation, it correctly figures out where to go. However, the gsap.to function fails to get the flying block to the right spot. Could someone help me with this? Here's the link to the project. Unfortunately, I can't use CodePen because this project is based on React. I'd appreciate any assistance in fixing this issue. Thanks!
×
×
  • Create New...