Hi, I have some issues working with path constrained bones and I assume it could be a bug in the way the path lengths are calculated. In particular - the last line segment.
Repro steps:
1) Open Spine and create close-to-fully symmetrical closed path
2) Export to .json
3) Explore the "lengths" json object in the corresponding path attachment
4) Notice there could be a problem
I attached a minimal repro case file: paths.spine as well as an image of the shape:
In the file the line:
"lengths": [ 182.59, 468.34, 749.23, 840.52 ],
should be:
"lengths": [ 182.59, 468.34, 749.23, 930.26 ],
which would mean that the last segment length will be around 181. Right now Spine exports its length as 91 (840.52 - 749.23 = 91) which is almost two times shorter. Looking at the image the last segment length is very close to the first segment one.
I have a question also related to the way the animations rely on path lengths during runtime.
Looks like all animated path constraint calculations rely on path segment lengths (and overall path length) as they are in the setup pose and I don`t see them being recalculated in the Spine CPP Runtime.
As I stretch the path with bones, also apply deformation the whole path shape shriks, expands etc. and with that all segment lengths do change (also the overall path length). When I have animated parameters that rely on current path lengths the observed behavior is strange. I understand that as long as both the Editor and the Runtime rely on everything being animated according to setup pose lengths the animation will look the same in the application as it looks in the Editor, also recalculating the segment lengths in runtime would need some extra calculations, but to me this is not the way it should be done.
Do you think it would be more correct if the path constraint calculations are done with the current (recalculated after deformation) segment and path lengths both in Editor and in Runtime?