18-05-2020, 05:34 PM
(This post was last modified: 18-05-2020, 05:36 PM by josemendez.)
(18-05-2020, 04:25 PM)FredTuna Wrote: Thanks for the quick answer!
For the attach points being set, that makes sense. For that case however, I'm setting a rope in a prefab (not at runtime). And I was looking for a way to set the position of that rope to its current attach points as a shortcut to having to manually move the control points. Even being able to manually set the position could be handy so I could just copy paste the position of the transforms I chose as attach points.
Setting attachment points manually is not a good idea, not at runtime, not in a prefab, for the same reason I outlined. Since they're calculated at bind time (Awake()) to avoid unphysical effects, whatever point you place the control point at will be used as attachment point.
Wouldn't snapping control points to a specific part of the target object suffice? Note that Unity's built-in snap tools (snap to vertex, snap to collider surface) do work with control point gizmos.