initial commit
|
@ -0,0 +1,4 @@
|
|||
* [Splines](index.md)
|
||||
* [Getting started with Splines](getting-started-with-splines.md)
|
||||
* [Spline Container](spline-container.md)
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
# Getting started with Splines
|
||||
|
||||
## Creating the Asset
|
||||
To create a spline game object there are three different methods.
|
||||
|
||||
In the Unity menu, go to **GameObject** > **Spline** > **New Spline**.
|
||||
<br/><img src="images/getting-started-create-spline-unity-menu.png" alt="Create Spline, Unity Menu" width="350"/>
|
||||
|
||||
In the Hierarchy window. RMB > **Spline** > **New Spline**
|
||||
<br/><img src="images/getting-started-create-spline-hierarchy.png" alt="Create Spline, Hierarchy window" width="350"/>
|
||||
|
||||
In the Inspector window, on a GameObject, **Add Component** > **Spline Container** (Script).
|
||||
<br/><img src="images/getting-started-create-spline-inspector.png" alt="Create Spline, Inspector window" width="350"/>
|
||||
|
||||
For more information, see also [Spline Container](spline-container.md).
|
||||
|
||||
## Component Editor Tools
|
||||
The **Knot Placement**, **Knot Move**, and the **Tangent Move** tools are available in the [Component Editor Tools](https://docs.unity3d.com/Manual/UsingCustomEditorTools.html#ToolModesAccessSceneViewPanel) overlay in the Scene window. The **Knot Placement** tool will be automatically engaged after the spline is created with the Unity menu or the Hierarchy window.
|
||||
<br/><img src="images/getting-started-component-editor-tools.png" alt="Component editor tools" width="350"/>
|
||||
|
||||
### Knot Placement Tool
|
||||
Use the **Knot Placement** tool to add knots. 
|
||||
|
||||
When the tool is engaged, you can place knots on a surface, such as, a Terrain object or a mesh face.
|
||||
<br/><img src="images/getting-started-knot-placement.gif" alt="Point Placement" width="350"/>
|
||||
|
||||
Clicking on the first point will close the spline.
|
||||
<br/><img src="images/getting-started-close-loop.gif" alt="Close Loop" width="350"/>
|
||||
|
||||
Placing knots not on a surface will place it on the grid instead.
|
||||
|
||||
Use **Ctrl** + **z** to delete the last created knot.
|
||||
|
||||
Use the **Esc** key to exit the **Knot Placement** creation.
|
||||
|
||||
|
||||
### Knot Move Tool
|
||||
Use the **Knot Move** tool to move knots.<img src="images/KnotMoveTool.png" alt="Knot Move Tool"/>
|
||||
|
||||
You can then select one or more knots to get a position handle to move them around.
|
||||
<br/><img src="images/getting-started-knot-tool-move-handle.gif" alt="Knot Move Handle" width="350"/>
|
||||
|
||||
Clicking on the spline will create a new knot.
|
||||
<br/><img src="images/getting-started-knot-tool-move-create.gif" alt="Knot Create" width="350"/>
|
||||
|
||||
Selecting a knot and then pressing the delete key will delete the knot.
|
||||
<br/><img src="images/getting-started-knot-tool-move-delete.gif" alt="Knots Delete" width="350"/>
|
||||
|
||||
|
||||
### Tangent Move Tool
|
||||
Use the **Tangent Move** tool to move knot tangents. <img src="images/TangentMoveTool.png" alt="Tangent Move Tool"/>
|
||||
|
||||
This can tool can only be engaged when in the Inspector window on the Spline Container the Edit Mode Type property is set to **Bezier**.
|
||||
<br/><img src="images/getting-started-knot-tool-tangent-type.png" alt="Edit Mode Type" width="350"/>
|
||||
|
||||
The tangent can be manipulated by moving the tangent handle.
|
||||
<br/><img src="images/getting-started-knot-tool-tangent-handles.gif" alt="Tangent Movement" width="350"/>
|
||||
|
||||
Holding Shift while using a tangent handle will display the radial rotation gizmo.
|
||||
<br/><img src="images/getting-started-knot-tool-tangent-shift.gif" alt="Tangent Shift Rotation" width="350"/>
|
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1,003 B |
After Width: | Height: | Size: 810 B |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 296 KiB |
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 404 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 742 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 701 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 2.3 MiB |
|
@ -0,0 +1,11 @@
|
|||
# Splines
|
||||
|
||||
<br/><img src="images/splines-splash.png" alt="Spline Splash" width="450"/>
|
||||
|
||||
The Spline package is split into two parts :
|
||||
* Editor spline representation and tools that can be plugged into any data representation by creating a converter.
|
||||
* Basic spline implementation that should cover most use cases.
|
||||
|
||||
For an introduction to the Spline package, see [Getting started with Splines](getting-started-with-splines.md).
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Spline Container
|
||||
<br/><img src="images/spline-container.png" alt="Spline Container" width="350"/>
|
||||
|
||||
The **Spline Container** is the component that stores the knot information and how the knots should be interpolated with **Edit Mode Type** and **Closed**. The Edit Mode Type is a list of the different methods of interpolations; **Catmull Rom**, **Bezier** and **Linear**. The per knot list contains the **Local Position** and optionally if using Bezier the **Tangent In** and **Tangent Out** values. The **Closed** property enables the spline to be interpolated as an enclosed loop instead of an open path.
|
||||
|
||||
| **Property** | **Description** |
|
||||
| -------------------------------- | ------------------------------------------------------------ |
|
||||
| Edit Mode Type | The methods to interpolate the knots into a spline; Catmull Rom, Bezier, Linear |
|
||||
| Knots | The number of knots in the spline. |
|
||||
| Element # | The per knot information. |
|
||||
| Local Position | The position of the knot. |
|
||||
| Tangent In | If in Bezier mode, the inner tangent of the knot. |
|
||||
| Tangent Out | If in Bezier mode, the outer tangent of the knot. |
|
||||
| Closed | Enables the spline to be interpolated as an enclosed loop instead of an open path.|
|
||||
|
||||
|
||||
|
||||
|