How do I create a dragging tail (top down)

0 favourites
  • 3 posts
From the Asset Store
Heads N Tails is an educational Ludo game of probability with visualization and in fun manner.
  • Hi guys!

    I've got a top down mouse in a maze and I'd like his tail to follow in a dampened way. The mouse rotates to his direction of movement, and I can set the tail position to the mouses back side. I've also managed to make the tail stick 1:1 to the mouses angle, but I'd like to delay that angle so it looks like its dragging.

    If I can work it out for 1 segment, I might add 3-5 segments to make a rope like dragging tail.

    Any ideas?

    Many thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've done something similar for a monster in my game using anglelerp. Hopefully I can word this so it makes sense.

    I'd set the first segment's angle like this: anglelerp(MouseTail0.angle, Mouse.Angle, 0.2)

    Then each following segment would be lerped to the previous one's angle . For a more natural flow you may want to decrease that last value a little bit with each one. So the first might be 0.2 as above and then 0.18, 0.16, 0.14 etc.

  • Thanks a lot Ahr, I will try it right away

    edit:

    It worked great! thanks very much...

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