Track Object

Track Object

The Track Object is used to define the start and end point where the notes should go through. It may also define the path it takes from one point to the other.

Image

The touch collider are defined on the Track Object. You may use both 2D and 3D colliders.

It is very useful to add Event Receiver components on the track to detect input and note events.

API

//Get the Track Objects from the RhythmDirector.
var trackObject = m_RhythmDirector.TrackObjects[0];

//Set the active note, this adds the note to be detected by input in the Rhythm Processor.
endPoint.SetActiveNote(note);

//Remove the note from being active.
endPoint.RemoveActiveNote(note);

//Get the start point.
var start = trackObject.StartPoint;

//Get the end point.
var endPoint = trackObject.EndPoint;

//Get the not direction a delta T
var noteDirection = endPoint.GetNoteDirection(deltaT);