User Tag List

Results 1 to 9 of 9

Thread: Movement like Pendulum example but full 360° clockwise and/or anticlockwise?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Movement like Pendulum example but full 360° clockwise and/or anticlockwise?

    Example

    I have an active object with an Alterable Value "Angl".
    Always: Set angle to Sin(Angl( "Active" ) ) * 80
    Add 3 to Angl

    Now I have an active object swinging like a pendulum.

    But how can I do full 360° swinging circles clockwise and/or anticlockwise using similar math functions?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jun 2007
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Wodjanoi,

    Is this what your after?
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I know this rotation example. It changes the position and I don't want that.

    I prepared a mfa file.
    It's a very smooth movement.
    I want never ending 360° circular rotation, but I can't imagine a possible solution.
    Attached files Attached files

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like this?
    There is probably a way of doing it with 'just' using an expression but...
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    That's a good example.
    Is there any way to prevent that pause(or shorter pause without speed increase)?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes
    Actually, i found a better method

    Its an eqation as simpl as this, and its quite smooth and flexible:
    Angle = Angle + RotationSpeed + Cos( Angle ) * Slowdown


    - RotationSpeed determines the rotation speed of Pendulum, in degrees ( allways at top speed when at 6 oclock )
    - Slowdown determines the 'peak' slowdown speed in degrees ( as it reaches 12 oclock )

    Note that if Slowdown exceeds RotationSpeed, rotation will come to a halt ( so keep Slowdown lower than RotationSpeed )
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Great! Simple and very useful. Thank you so much for this example.

    I guess for clockwise rotation it's just:
    Angle - RotationSpeed - Cos( Angle ) * Slowdown ?

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only one way to find out, but yeah should be

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ill have to correct my explanation of how this works.

    Angle = Angle + RotationSpeed + Cos( Angle ) * Amplification

    So

    Angle = Angle + RotationSpeed
    ^ This makes the Pendulum rotate at a constant speed

    Angle = Angle + RotationSpeed + Cos( Angle ) * Amplification
    ^Cos of an Angle returns an increasingly possitive number when Angle is pointing downward, and incresing negative number when pointing uppwards

    ( Assuming Pendulum is rotating counter-clockwize )
    So what this means when appended to the constant rotations is, the Pendulum will recieve an 'increasing resistance', in rotation degrees, to its rotation speed as it approaches 12oclock, and an equal 'increasing boost', in rotation degrees, as it approaches 6oclock.
    Amplification can then be defined as 'max rotation resistance and boost', in degrees.

    - So the max rotation speed at 6 oclock will be equal to 'Rotation Speed + Amplification' ( in degrees )
    - And the max rotation speed at 12 oclock will be equal to 'Rotation Speed - Amplification' ( in degrees )

    And again, if the resistance/boost ( Amplification ) is greater than the constant rotation, Pendulum will reach a point where the Resistance cancles out the constant rotation and the Pendulum will come to a stop.

Similar Threads

  1. Is pinball movement compatible with the full HTML5 exporter?
    By oruga in forum HTML5 Export Module 2.5
    Replies: 2
    Last Post: 21st August 2015, 04:09 PM
  2. Replies: 1
    Last Post: 6th November 2013, 08:12 PM
  3. clockwise or anti-clockwise rotation
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd January 2011, 01:13 PM
  4. Box2D Polygon Not Clockwise?
    By Jacob in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th October 2010, 06:31 AM
  5. Circular movement, Ant-clockwise and Clockwise?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 13th August 2008, 06:39 AM

Posting Permissions

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