User Tag List

Results 1 to 6 of 6

Thread: What is the simple formula for orbiting on top of object as its angle change?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the simple formula for orbiting on top of object as its angle change?

    I cant figure it out. I have a rotating platform disk, you jump on it and as it spins (angle change increase 10 degrees for full circle) you must stay at the position on top of the object and maintain your position relative to the angle it is facing. I cant even figure this out in any other language or tool. It seems it must use polar orbit? I am unsure of this formula and cant find any example of what I need. Basically the active must overlap a active, and when the second active rotates the first one maintains its spot on top of the second one relative to the angle it is facing like a ferris wheel.

    anyone good at this kind of math can share with me the formula for figuring it out in x and y pos?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I guess the only viable solution would be a little trigonometry.

    Maybe something like this:
    troll_on_the_moon.mfa

    But it should be refined a little
    (or main player better having a smaller collision box / or smaller foots )

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks alot, i knew you had to store the initial landing angle to keep track of and manipulate the change but i didnt realize how many steps went into this it doesnt even need to be a platform just maintain same distance X and Y from the origin while it rotates

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    You can cut down many steps if you don't need the jump-out thing,
    main job will be storing rotating object's radius and using the cos/sin formula to update the orbiting object position at angled distance from center:

    X(rotating_obj) + radius* cos(angle)
    Y(rotating_obj) + radius* sin(angle)

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, I cant figure this out, do you know how I can make it so the X and Y are still modifiable by normal -x + x -y +x manipulations while overlapping the disk?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    You mean altering X/Y position of player while over the disk?

    This is already done by sin/cos equations, so you would have to:

    1) switch off those equations (like disabling flag)
    2) altering X-Y position after those equations, and do it on a "always" basis as the equations do,
    otherwise on next frame the equations would revert it back to their inner workings

Similar Threads

  1. Math formula needed (relatively simple)
    By Asholay in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th February 2013, 06:45 AM
  2. Player controlled active object orbiting around fixed point?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th June 2012, 05:21 AM
  3. Active Object Change Angle
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th May 2011, 04:26 PM
  4. Help with simple formula
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th September 2008, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •