diff --git a/Source/ProceduralAbstractSoRShape.cs b/Source/ProceduralAbstractSoRShape.cs index df913b36..ab507b51 100644 --- a/Source/ProceduralAbstractSoRShape.cs +++ b/Source/ProceduralAbstractSoRShape.cs @@ -351,7 +351,7 @@ private object AddAttachmentNormalized(TransformFollower attach) // This is easy, just get the UV and location correctly and force an update. // as the position might be after some rotation and translation, it might not be exactly +/- 0.5 - if (Mathf.Abs(Mathf.Abs(position.y) - 0.5f) < 1e-5f) + if (Mathf.Abs(Mathf.Abs(position.y) - Mathf.Abs(position.magnitude)) < 1e-5f) { if (position.y > 0) { diff --git a/Source/ProceduralShapePolygon.cs b/Source/ProceduralShapePolygon.cs index 33c44d6e..f45f4f11 100644 --- a/Source/ProceduralShapePolygon.cs +++ b/Source/ProceduralShapePolygon.cs @@ -544,7 +544,7 @@ private object AddNormalizedAttachment(TransformFollower follower) Attachment attachment; // as the position might be after some rotation and translation, it might not be exactly +/- 0.5 - if (Mathf.Abs(Mathf.Abs(position.y) - 0.5f) < 1e-5f) + if (Mathf.Abs(Mathf.Abs(position.y) - Mathf.Abs(position.magnitude)) < 1e-5f) { attachment = AddNormalizedCapAttachment(follower, position); }