How do I create waving or tentacle-like objects?

0 favourites
  • 7 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I'm making an underwater game and I think some cool ambience might include some giant tentacled creatures, like a squid or something. I'd like to make it so that its tentacles move in a wave shape the way they do in real life.

    I tried this first by making segments joined by hierarchies but obviously that didn't work because hierarchies just make all the connected parts move at once and in the same direction. I also tried using the physics plugin to create joints between parts, but that also didn't work because the joint system in the physics plugin only lets you choose an object type to link to, not instances, which just made them all connect to each other (I think). The only remaining option seems to involve math, only I have no clue where to start with that kind of math.

    It just occurred to me that the exact type of behavior I am looking for is the Worm AI for enemies in Terraria. Worm-type enemies are made up of segments with a head and a tail, and all the segments follow the head in a chain-like pattern. So if anybody knows how that system works and can explain how to replicate it, that would be awesome.

  • This is pretty much what I am looking for, could you explain how it works?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That example utilizing physics to inter-connected segments and ordered based on their IID. The tip set as immovable (physics property) and the rest follow (like rope) yellow

    one that act as a lead.

    Here another example using pin behavior so you will understand the use of tag variable:

    dropbox.com/s/x2now0l7f993boo/snake_body_pin.capx

    Lead segement driven by sine behavior of course you can change it to be controlled by any movement.

  • Here is another example:

    howtoconstructdemos.com/starfish

  • That example utilizing physics to inter-connected segments and ordered based on their IID. The tip set as immovable (physics property) and the rest follow (like rope) yellow

    one that act as a lead.

    Here another example using pin behavior so you will understand the use of tag variable:

    https://www.dropbox.com/s/x2now0l7f993boo/snake_body_pin.capx?dl=0

    Lead segement driven by sine behavior of course you can change it to be controlled by any movement.

    Umm, this might sound like a noob question but how do I reorder the animation frames without breaking it?

  • What the animation frames consist of? Like limb base, limb segment, tip, etc. It would be just fine if you copy paste object one after another. Alternatively you can create "queue" instance variable so you can set the queue order manually.

    *edit: If what you mean is setting animation frame, you can just change the value at sprite object properties or via event.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)