User Tag List

Results 1 to 10 of 10

Thread: Swinging chain without physics extension

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Swinging chain without physics extension

    So I'm having trouble trying to come up with a solution for a simple chain that hangs vertically and is made up of multiple objects, and when the character moves past the chain, the chain will sort of drag with the character a short distance and then come back to a rest.

    I'm not looking for like rope swinging or anything using physics... I checked out the Walrus example and it's way over complicated and far more than I'm needing to do.

    I just want like 10 objects attached in a vertical line, and being able to slightly sway those objects back and forth, preferably having their angles adjust and swinging in a slight curve.

    Does anyone think they could take a crack at making this or should I just keep screwing around with stuff? :P

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    I will find one of the examples and get back to you. In the mean time, by all means, just keep "screwing around" with stuff.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I think I might just be able to get away with doing it as an animation, but an actual coded method would be appreciated regardless... good for learning.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the up and down arrows to swing back and forth.
    This example can be applied however you'd like by simply changing the pos value.

    I wanted to use real physics, but it seems like you wanted something like this, a simple math function to simulate physics.
    Attached files Attached files

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Yes! That's exactly what I wanted. Thanks a ton.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem. If you need help with the swinging back and forth then slowly stopping (due to friction), let me know.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Haha... looks like I need help with that also.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a rough example.
    Attached files Attached files

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to prevent that twitching when the objects line up straight vertically?

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is I use the integer X and Y positions, rather than storing them as decimals in alterable values. So when the position is 0, the sin function is going to return 1 rather than 0.9 or such, so the objects expand 1 pixel per link.

    Also notice that if you sit at the bottom of the rope, it bounces back and forth, because I add 1 to pos. If you add a smaller value to pos, it looks smoother, but you have to deal with friction better.

    I'll leave these fixes up to you, as you need to apply it to your own system anyway.

Similar Threads

  1. Swinging rope physics?
    By 300happy in forum Multimedia Fusion 2 - Technical Support
    Replies: 26
    Last Post: 4th September 2017, 12:49 AM
  2. Physics Chain
    By Tiger in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th August 2011, 01:47 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
  •