diff --git a/CameraRoll/CameraRoll/manifest.jecs b/CameraRoll/CameraRoll/manifest.jecs index 9a4d0ac..4b2f29f 100755 --- a/CameraRoll/CameraRoll/manifest.jecs +++ b/CameraRoll/CameraRoll/manifest.jecs @@ -1,7 +1,7 @@ ID: D4VID_CameraRoll Name: CameraRoll Author: D4VID -Version: 0.2.1 +Version: 0.2.2 Priority: 0 ClientOnly: true Dependencies: diff --git a/CameraRoll/CameraRoll/src/client/tool/CameraRollTool.cs b/CameraRoll/CameraRoll/src/client/tool/CameraRollTool.cs index a29ec17..33ab66c 100755 --- a/CameraRoll/CameraRoll/src/client/tool/CameraRollTool.cs +++ b/CameraRoll/CameraRoll/src/client/tool/CameraRollTool.cs @@ -54,6 +54,10 @@ namespace CameraRoll.Client.Tool { }; point.AddComponent(); PathPoints.Add(point); + + if (PathPoints.Count > 1) { + point.GetComponent().LinkPreviousPoint(PathPoints[^2]); + } } public static void Play() { diff --git a/CameraRoll/CameraRoll/src/client/tool/PathPoint.cs b/CameraRoll/CameraRoll/src/client/tool/PathPoint.cs index bd88b2e..f14f79c 100644 --- a/CameraRoll/CameraRoll/src/client/tool/PathPoint.cs +++ b/CameraRoll/CameraRoll/src/client/tool/PathPoint.cs @@ -18,10 +18,26 @@ namespace CameraRoll.Client.Tool { lr.positionCount = 2; lr.SetPosition(0, dir.normalized * -AxisLength); lr.SetPosition(1, dir.normalized * AxisLength); - lr.material = new Material(Shader.Find("Unlit/Color")); - lr.material.color = color; + lr.material = new Material(Shader.Find("Unlit/Color")) { + color = color + }; lr.startWidth = 0.02f; lr.endWidth = 0.02f; } + + public void LinkPreviousPoint(GameObject point) { + GameObject line = new GameObject("Link"); + line.transform.SetParent(transform, false); + LineRenderer lr = line.AddComponent(); + lr.useWorldSpace = true; + lr.positionCount = 2; + lr.SetPosition(0, transform.position); + lr.SetPosition(1, point.transform.position); + lr.material = new Material(Shader.Find("Unlit/Color")) { + color = Color.magenta + }; + lr.startWidth = 0.01f; + lr.endWidth = 0.01f; + } } } \ No newline at end of file