Hello! I'm making a procedurally animated character in godot, and I've run into an issue.
I plan on using a skeleton for the character's... er... skeleton, and draw the character with Line2Ds and Polygon2Ds.
One issue though... It seems that a bone's local position does not quite reflect its real local position.
@export var skeleton: Skeleton2D
@export var line: Line2D
func update_line():
line.set_point_position(0, Vector2(0, 0))
for indx in range(skeleton.get_bone_count()):
if indx > 4:
break
print(get_bone(indx).position)
line.set_point_position(indx, skeleton.get_bone(indx).position)
Printing the positions of the bones while moving, it seems they make only very small changes in position while being posed with IK.
I suppose, i could use the global position of the bones, but then I would need to convert them back into local positions, (since the line being drawn shares the skeleton's parent)
Looking at some methoods, I think I may be doing it all wrong. Should I be getting the bone positions some other way? Should I use some sort of node as a child of the bones?