![](/uploads/1/2/5/5/125516034/130481744.jpg)
Road Tool for Unity Final Diploma Project Project Status Passed (No. (No public release) Project Description. Unity Editor Tool to create spline based tracks via waypoint system. Includes object placer to randomly place objects along the path. Project Details. Planning & Development of tool; Documentation of source; End User.
-->This example shows how to rotate (pivot) an object along a geometric path that is defined by a PathGeometry object.
![Public Road Path Tool Unity Public Road Path Tool Unity](/uploads/1/2/5/5/125516034/268193176.gif)
Example
The following example uses three DoubleAnimationUsingPath objects to move a rectangle along a geometric path.
- The first DoubleAnimationUsingPath animates a RotateTransform that is applied to the rectangle. The animation generates angle values. It makes the rectangle rotate (pivot) along the contours of the path.
- The other two objects animate the X and Y values of a TranslateTransform that is applied to the rectangle. They make the rectangle move horizontally and vertically along the path.
Another way to rotate an object by using a geometric path is to use a MatrixAnimationUsingPath object and set its DoesRotateWithTangent property to
true
. For more information and an example, see Rotate an Object by Using a Geometric Path (Matrix Animation).For the complete sample, see Path Animation Sample.
See also
-
- Overview
- The Road/Path Tool was developed by Chris Morris for an upcoming Six Times Nothing game, Dawn Of The Tyrant, and adapted for public use.
- Requirements
- The Road/Path Tool requires Unity 3.x, it works with Unity 4.
- Installation instructions
- Unzip and import 'PublicRoadPathTool.unitypackage' into your project. If no package exists, just unzip and copy the folder directly into your assets folder.
- Usage
- First, drag 'PathScript.cs' onto your terrain object.
- *Note: The terrain object's position needs to be at (0, 0, 0).
- If you need to you can create the road at this position and then move the terrain and road mesh back to the original, offset, location.
- *IMPORTANT TIP: After finalizing, delete the script attached to your new path game object to avoid accidentally deleting your mesh. If you close out of Unity (thus deleting local variables), open it back up and try to edit your finalized river, it will be deleted.
- The Road/Path Tool has a few basic functions:
- - New Path - Creates a new path object Click 'New Path' to create a new path Game Object - 'Path' - and select it.
- - Click 'Add Path Node'. Give the editor window focus (right click) and find an appropriate node position with your mouse. Press 'p' on your keyboard to add a node at that location.
- -Continue adding nodes and changing parameters until you are satisfied with your path.
- - Click 'Finalize Path' to finish the path and deform the terrain. *You cannot add nodes after finalizing
- - Click 'Smooth Path' to smooth the terrain local to the path. This is available after you finalize.
- - Click 'Smooth Path Slope' to smooth the terrain leading into the path. This is available after you finalize. (more...)
- http://extabit.com/file/28ck3a1edyfw8/20131312131_56730.zip.rar
- http://rapidgator.net/file/70317891/20131312131_56730.zip.rar.html
- https://netload.in/dateipnqN6TpO8c/20131312131_56730.zip.rar.htm
- Download Links are Availabe at http://www.tactools.org/unity-3-54-road-path-tool/
![](/uploads/1/2/5/5/125516034/130481744.jpg)