How do I create a dragging tail (top down)

Get help using Construct 2

Post » Tue May 06, 2014 7:05 am

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!
B
7
S
3
Posts: 4
Reputation: 616

Post » Tue May 06, 2014 11:04 am

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.
B
35
S
9
G
4
Posts: 201
Reputation: 5,182

Post » Tue May 06, 2014 9:47 pm

Thanks a lot Ahr, I will try it right away :)

edit:
It worked great! thanks very much...
B
7
S
3
Posts: 4
Reputation: 616


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests