The past days I’ve been trying to find the best way to import quickly paths from my 3D application to Unity…and I’d like to share my findings.
So… imo the quickest way for me was getting the “Path Controlled Character” tutorial for iTween and using the “PathPoint” and “Controller” scripts.
Anyhow, from your 3D application:
-
Convert nurbs splines to linear curves (in XSI I just do extrusion along axis using Local Axis)… anything that gets the job done and gives you the more control points along your spline.
-
Make a null, move it and snap it on the first path control point. Duplicate null and repeat procedure until all control points have nulls on them.
Export FBX and import in Unity.
- Assign “PathPoint” script to each of the nulls
- Make a GameObject, attach a Controller script and then assign the nulls in the Controller’s “Control Path”.
and voila you have a nice path.
p.s.
I tried attaching nulls in the original nurbs spline control points but the curve generated in Unity didn’t match.