PathConstraint Class Reference

A simple controller to allow a GameObject to follow a path whilst optionally looking at a target object. More...

Inheritance diagram for PathConstraint:
PreviewCameraController

List of all members.

Public Member Functions

void Awake ()
 Validate initial state.
virtual void Update ()
 Called once per frame to update the owner object's transform.
virtual void OnPathEndReached ()
 Override this method to receive an event when this constraint reaches the end of the path.
virtual void ResetPath ()
 Resets the constraint to the beginning of the path.
virtual void ResetPath (bool restart)
 Resets the constraint to the beginning of the path and optionally re-enables the path following behaviour from the start point.

Public Attributes

CurvePath path
 The path on which to constrain this object.
Transform target
 The transform to look at.
float speed = 1.0f
 The speed at which to traverse this path.

Detailed Description

A simple controller to allow a GameObject to follow a path whilst optionally looking at a target object.


Member Function Documentation

void PathConstraint.Awake (  ) 

Validate initial state.

virtual void PathConstraint.OnPathEndReached (  )  [virtual]

Override this method to receive an event when this constraint reaches the end of the path.

Reimplemented in PreviewCameraController.

virtual void PathConstraint.ResetPath ( bool  restart  )  [virtual]

Resets the constraint to the beginning of the path and optionally re-enables the path following behaviour from the start point.

virtual void PathConstraint.ResetPath (  )  [virtual]

Resets the constraint to the beginning of the path.

virtual void PathConstraint.Update (  )  [virtual]

Called once per frame to update the owner object's transform.

Reimplemented in PreviewCameraController.


Member Data Documentation

The path on which to constrain this object.

float PathConstraint.speed = 1.0f

The speed at which to traverse this path.

The transform to look at.

If not specified the object will look along the path with its Z axis, with Y pointing up


The documentation for this class was generated from the following file:

Generated on Fri Aug 21 09:09:58 2009 for Hamlington Underground Racing Association by  doxygen 1.6.0