Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Create CirclePath2D *From* an Object's Position

Recommended Posts

Hello everybody ::- ).


I have a board with many well organized objects on it. I would like to create an animation where they all start circling at various speeds. But the problem is that I want them to start on their circle paths from their current locations, swirling around the center of the screen. Any idea how I could do this?


I guess I could use Pythagora's theorem to find out the radius of the Circle, but I'm unsure how I could find out the progress of the Object onto its Circle Path, so that I only start the animation from that point. Otherwise, when I add it to the Path, it'll lose its original position and I don't want that.

Link to comment
Share on other sites

Sure, if you figure out the angle (and it sounds like you know how), you can simply use the CirclePath2D's angleToProgress() method to translate that angle to a progress value. See the ASDocs for more details, but it should be relatively straightforward.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hm, I thought about using that method. So you think this approach should work, right? I mean, what I'm trying to do is not impossible.

Link to comment
Share on other sites

Sure, seems very doable (if I'm understanding your goal properly)

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.