diff --git a/Assets/Scripts/Framework/[RScript] b/Assets/Scripts/Framework/[RScript] index c4be6db..249a2f9 160000 --- a/Assets/Scripts/Framework/[RScript] +++ b/Assets/Scripts/Framework/[RScript] @@ -1 +1 @@ -Subproject commit c4be6dba7371951c1da2e17a543011351c10d6c5 +Subproject commit 249a2f9ce36add06f13ca62b20a54ca23144398d diff --git a/Assets/Scripts/MoreSpline/SplineNode.cs b/Assets/Scripts/MoreSpline/SplineNode.cs index c490dcb..4ac668b 100644 --- a/Assets/Scripts/MoreSpline/SplineNode.cs +++ b/Assets/Scripts/MoreSpline/SplineNode.cs @@ -51,6 +51,7 @@ namespace Demo.Game } private Node m_MyNode; + public bool IsSetupNodeSize = false; public float NodeSize = 1; public Color NodeColor = Color.white; public bool IsSetupNodeRotation = false; @@ -62,9 +63,18 @@ namespace Demo.Game public void AddTo(SplineCore core) { int MyNodeContent = core.NodeContent; - core.MySplineComputer.SetPointColor(MyNodeContent, NodeColor); + MyNode.transformSize = !IsSetupNodeSize; core.MySplineComputer.SetPointSize(MyNodeContent, NodeSize); - core.MySplineComputer.SetPointNormal(MyNodeContent, IsSetupNodeRotation ? NodeRotation.normalized : transform.up); + if (IsSetupNodeRotation) + { + MyNode.transformNormals = false; + core.MySplineComputer.SetPointNormal(MyNodeContent, NodeRotation.normalized); + } + else + { + core.MySplineComputer.SetPointNormal(MyNodeContent, transform.up); + } + core.MySplineComputer.SetPointColor(MyNodeContent, NodeColor); MyNode.AddConnection(core.MySplineComputer, MyNodeContent); } @@ -75,7 +85,7 @@ namespace Demo.Game [Convention.RScript.Variable.Attr.Method] public void SetNodeSize(float size) { - SetLocalScaling(size, size, size); + IsSetupNodeSize = true; NodeSize = size; } @@ -102,7 +112,7 @@ namespace Demo.Game public void SetNodeRotation(float x, float y, float z) { IsSetupNodeRotation = true; - this.transform.localEulerAngles = NodeRotation = new(x, y, z); + NodeRotation = new(x, y, z); } } }