Game Development Reference
In-Depth Information
6. To RacerA , add an instance of the SplineMgr script. Set the
splineNodeRoot to _splineDataA to install these control points into the
manager class. Set the playbackMode to paused and the playback type to
const_dt so that the splineObject starts stationary, but will move along
the path with some natural looking acceleration and deceleration.
7. Follow steps 6 and 7 for RacerB , but associate _splineDataB instead of
_splineDataA .
8. Set the speeds of racers ( dt value) to 0.0015 and 0.001 respectively. This will
set the racers' speeds to sufficiently similar values to make the race compet-
itive.
9. Congratulations! You have implemented two racer NPCs that will compete
with the player for first place in the race. Note that they don't have to wait to
answer the quiz questions as the player does.
Search WWH ::




Custom Search