User Tag List

Results 1 to 6 of 6

Thread: Creating a snake style movement with the base anchored to an object?

  1. #1
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    653
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Creating a snake style movement with the base anchored to an object?

    Hey guys, im having a really hard time trying to figure this one out. As many of you know im making a fan game remake of castlevania 3 and one of the main enemies in the game is the white dragon. What it is is a snake type enemy but with a twist. The base of his backbone is anchored to a block and all the other pieces of the back bone branch off of it, in the snake style movement.

    See 2:20 in the vid to get an idea of what im trying to do:


    Does anyone have any suggestions on how to make this work? Using the follow the leader type example included works to an extent, but i can't find a way to keep the bones pinned to the anchor point at the first bone as you see in the video

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The example you posted is pretty brief, but for the extending/contracting movement, how about having two objects - the anchor point tail section and the head - and then spreading tail segments evenly between those two anchor points? I'm using an alterable value on the head here to make the tail section calculations a little easier to read:

    + Always:
    - Head: Set distanceFromAnchor to (X("Head") - X("Anchor"))
    - Tail section 1: Set X position to X("Anchor") + (distanceFromAnchor("Head") * 0.25)
    - Tail section 2: Set X position to X("Anchor") + (distanceFromAnchor("Head") * 0.5)
    - Tail section 3: Set X position to X("Anchor") + (distanceFromAnchor("Head") * 0.75)

    And do the same for Y position.

  3. #3
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    653
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks DavidN and sorry for the brief example lol, im at work and cant pull up youtube very well lol. Basically what the enemy does is move around in a snake like motion, away and then towards the anchor point, its head of course being the main drive that moves the rest of the spine. I'll try out what you suggested and post back with the results. Thanks again!

  4. #4
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    653
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    DavidN, THANK YOU!!!! That's EXACTLY what i was looking for dude! And that code seems so simple....just when i think im learning pretty advanced stuff you guys get simple code to do something that i can't with what i have lmao. Thanks again!

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fantastic Glad to help!

  6. #6
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    653
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Just added another name to the special thanks in my credits lol

Similar Threads

  1. Platform Movement Object (PMO) base engine
    By highjack24 in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 13th November 2016, 09:01 AM
  2. 360-Degree Snake Movement
    By SergeantBiscuits in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st February 2012, 08:14 PM
  3. Snake/tentacle movement
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 1st November 2011, 06:41 PM
  4. Snake Movement
    By MuddyMole in forum File Archive
    Replies: 0
    Last Post: 3rd September 2011, 02:51 PM
  5. Snake movement example
    By Nick in forum File Archive
    Replies: 2
    Last Post: 11th June 2008, 11:59 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
  •