SebLague / Path-Creator

Path creation asset for Unity game development
https://assetstore.unity.com/packages/tools/utilities/b-zier-path-creator-136082
MIT License
1.83k stars 319 forks source link

Added a BezierPathJoiner component to the Examples for stiching together multiple paths into one #119

Open flo-wolf opened 2 years ago

flo-wolf commented 2 years ago

Added a BezierPathJoiner component to the Examples, which allows for stiching together multiple BezierPaths into one with smooth transitions. This is done by adding the BezierPathJoiner component to a new GameObject with a PathCreator component on it. Through the inspector other PathCreators can be referenced into a List, and via a click on the "Join Paths" button, all BezierPaths of the referenced PathCreators get joined into a single path, which then gets applied to the PathCreator.

Additionally, BezierPath.cs file is now correctly formatted and has an additional helper function for adding multiple points at once to the path, as well as a new cloning-constructor for creating a perfect copy of a BezierPath from another BezierPath.

flo-wolf commented 2 years ago

Before Joining: 3 individual Paths, part of 3 different PathCreator components image

After Joining: A single path with smooth transitions image

The BezierPathJoiner component: image