Jump to content
Search Community

Astarno

Members
  • Posts

    2
  • Joined

  • Last visited

Astarno's Achievements

  1. I'll be experimenting with your suggestions tomorrow, thanks a lot for your reply! Just to answer your question: ideally I would like my objects to simply change their course and maintain their speed. I don't really mind about the timing of the animation, but I do mind about it looking smooth. So lets say they had to travel 10 units in 1 second. That would give them a speed of 0.1 units/s. After travelling 9 units, their destination suddenly changes and they have to travel another 5 units. Then I would probably want that animation to take 0.5 seconds. I have to see if it is worthwhile doing all these calculations though. If I need more help tomorrow I'll be sure to create a minimal demo.
  2. I'm currently trying to shoot (move) little squares from one position to another. To achieve this, I am using Three.js for the drawing/rendering together with GSAP for the animations. My current code to perform the animation looks as follows: gsap.to(obj.position, { duration: 1, x: destinationObj.position.x, y: destinationObj.position.y, z: destinationObj.position.z, }) It is possible that my destination object coordinates change during the animation. However, with my current code the object still moves to the old coordinates, which doesn't look nice. Is there a way to continuously update the destination coordinates during the animation such that my objects adjust their course when necessary?
×
×
  • Create New...