IrrAddSplineAnimator

section index

## NAME

IrrAddSplineAnimator - add a spline animator to a node

## SYNOPSIS

*animator.l = IrrAddSplineAnimator(*irr_node.l, array_size.l,*x.f,*y.f,*z.f,time_to_start.l,speed.f,tightness.f)

## INPUTS

*irr_node.l | - | refers to a node you have added to the scene.
array_size.l | - | specifies how many points there are in your spline motion.
time_to_start.l | - | specifies the number of milliseconds that must pass before the animation starts.
speed.f | - | defines the rate the node moves along the spline curve.
tightness.f | - | specifies how tightly the curve is tied to the points (0 is angular And 1 is very loose).

## FUNCTION

This is one of the more difficult to set up of the animators but is very natural looking and powerful. A spline is a curved line that passes through or close to a list of co-ordinates, creating a smooth flight. This animator needs a list of coordinates stored in three arrays, one array each for the X, Y and Z locations of all the points. A good way to get co-ordinates for these arrays is to load in the camera position example program and move your camera to a point and write down its co-ordinates.

## EXAMPLE

       #SPLINE_POINTS = 4
       Dim SplineX.f(#SPLINE_POINTS)
       Dim SplineY.f(#SPLINE_POINTS)
       Dim SplineZ.f(#SPLINE_POINTS)
       SplineX(0) = -100 : SplineY((0) =   50 : SplineZ((0) =    0
       SplineX(1) =    0 : SplineY((1) =  100 : SplineZ((1) = -100
       SplineX(2) =  100 : SplineY((2) =   50 : SplineZ((2) =    0
       SplineX(3) =    0 : SplineY((3) =  100 : SplineZ((3) =  100
       *SplineAnimator.l = IrrAddSplineAnimator( *CameraNode, #SPLINE_POINTS, @SplineX(0), @SplineY(0), @SplineZ(0), 0, 0.5, 1)

## RESULT

pointer to a Irrlicht-Animator.