u/Secret_Selection_473

Image 1 — Help getting a "worm on a string" kind of movement
Image 2 — Help getting a "worm on a string" kind of movement
▲ 52 r/godot

Help getting a "worm on a string" kind of movement

Im doing some kind of 2D worm/grub character in an aerial view. I want to control the movement moving the head with wasd and I want the different body segments to follow allong, curving it a little.

I join everything with bones, but I never worked using bones and idk if i need other kind of node. Right now I can rotate the bones in the inspector and get the kind of movement I want, but this is only for manual animation, I want it to follow the input movement. Can someone tell me what nodes I should use ir where I can reach for a tutorial or information about it? Thank you so much

EDITED, I solved it with code and no special nodes with a function that goes

func (part_that_follows, followed_part): part_that_follows.position = followed_part.position + (part_that_follows.position - followed_part.position).normalized() * part_distance
part_that_follows.rotation = (part_that_follows.position - followed_part.position).angle() - PI/2

I have to adjusts the parts sprites but it works pretty nice like this, enough for a gamejam game

u/Secret_Selection_473 — 23 hours ago

I sew the udders a little crooked but for the rest I think it end up pretty cute :}

Im making another one to test the pattern and see if I wrote down something wrong and then Ill upload it to the internet! Does someone knows where I acn upload it? I prettend to make it free but idk where people usually upload/search for this kind of stuff

Also, if someone here knows how usually are done this kind of tail i will like to know, I did whatever and Im not satisfied with it

u/Secret_Selection_473 — 23 days ago