06-04-2022, 07:49 AM
(This post was last modified: 06-04-2022, 07:49 AM by josemendez.)
Hi!
There's several possible causes for this (distance constraints stretching scale > 1, poor convergence due to iterations/substeps, among others). Going to assume everything else not shown in your code is set to default settings:
You know the distance between the two control points in a straight line, but what's the distance between them along the path? You're normalizing the path tangents, which means that for any distance that's roughly < 1 (the tangent length) the path will be a "flat curve" -move forward, then backwards, then forwards again- and as a result the rope will be longer than the distance between the points in a straight line.
Have you tried shortening the tangents?
There's several possible causes for this (distance constraints stretching scale > 1, poor convergence due to iterations/substeps, among others). Going to assume everything else not shown in your code is set to default settings:
You know the distance between the two control points in a straight line, but what's the distance between them along the path? You're normalizing the path tangents, which means that for any distance that's roughly < 1 (the tangent length) the path will be a "flat curve" -move forward, then backwards, then forwards again- and as a result the rope will be longer than the distance between the points in a straight line.
Have you tried shortening the tangents?