Game Development Reference
In-Depth Information
7. To playback the spline, create an instance of the
SplineMgr
class, and at-
tach it to a GameObject. Set the
dt
variable and playback type to
0.1
and
loop
.
8. Assign
curve1
to the
SplineNodeRoot
field of the
splineMgr
class.
9. Create an instance of
npcScript
, and attach it to the
headObj
object as
well. Assign the
SplineMgr
component on the
headObj
object to the path
reference in the
npcScript
class.