User Tag List

Results 1 to 5 of 5

Thread: pendulum swinging object example

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    pendulum swinging object example

    An example of making an object swing like a pendulum using sin/cos.

    In reference to: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=155706&gonew=1# UNREAD
    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2
    dragonguy's Avatar
    Join Date
    Apr 2008
    Location
    RULE BRITANNIA!
    Posts
    3,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: pendulum swinging object example

    It stops too suddenly, that is unrealistic, it should slow down then accelerate in the other direction and move back, otherwise excellent job.

    Note: You can use Sin/Cos to do this.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: pendulum swinging object example

    He used sin/cos... I haven't got the chance to look at it, but It sounds good if you used sin/cos correctly!

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: pendulum swinging object example

    I just noticed something with this. The object gets placed in an absolute position before it starts as seen here.
    Set X Position to 320+(Sin((AngleTo( "Active" ))-90)*Distance( "Active" ))

    How about adding 2 more alt. values (Value D, Value E) named Pos X and Pos Y. Use 'Start of frame': Set Pos X(Value D) to X("Active"), and Set Pos Y(Value E) to Y("Active"). Then in the always event, use this instead.
    Set X Position to Pos X( "Active" )+(Sin((AngleTo( "Active" ))-90)*Distance( "Active" ))
    This way, the swinging object is not always bound to a specific position on the screen before swinging. It would have its own starting position.

    I know this is something a little bit extra, and probably not necessary for this example, but it helps.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: pendulum swinging object example

    Check my reply in the same topic mobichan is reffering to, to see how you can do the yposition with sine too.

Similar Threads

  1. Pendulum issue using platform swing object
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th January 2013, 06:06 PM
  2. Pendulum
    By Captain_Harris in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 15th November 2011, 07:50 PM
  3. Swinging Pendulum Multiwidget
    By Popcorn in forum Widgets
    Replies: 9
    Last Post: 10th August 2009, 08:29 AM
  4. Phyzix Object - Pendulum Example / Problem
    By drnebula in forum File Archive
    Replies: 0
    Last Post: 24th December 2007, 01:22 AM
  5. Phyzix Object - Pendulum Example / Problem
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th December 2007, 01:21 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
  •