From f4a752213fc6c52dcdc90bce5ee39e10ad70838e Mon Sep 17 00:00:00 2001 From: clusta Date: Mon, 30 Sep 2019 18:55:04 +0300 Subject: [PATCH 1/2] Attachment nodes position fix --- Source/ProceduralAbstractSoRShape.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From f7a6ce98c3ea7efd3e28843710713678da9cdd73 Mon Sep 17 00:00:00 2001 From: clusta Date: Wed, 30 Oct 2019 18:22:05 +0300 Subject: [PATCH 2/2] Add attachment nodes fix to polygon shape --- Source/ProceduralShapePolygon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }