/* * parameters: * layer (internally set), vector3 target * * makes the controller set up waypoint tracking to go to the specified position * (cue's runtime interest position) * * the cue ends when the transform is within the arrive threshold * * waypoint cue hiearchy: * base * start movement cue * waypoint cue <-- cue calls method below * * so movement should already have been started by the time this method is called */ void GoToWaypoint(object[] parameters) { Debug.Log("going to waypoint in tracker event"); int l = parameters.Length; //unpack parameters // int layer workingLayer = (int)parameters[0]; waypointTracker.GoToWaypointManual((Vector3)parameters[1], OnWaypointArrive); if (waypointTracker.hasDestination) { //take control of the player's end play callback, to call it when arriving at waypoint waypoint_endEventPlayerPlay = eventPlayer.OverrideEndPlay(workingLayer, null, "Go to waypoint"); Debug.Log("going to waypoint in tracker 2"); } // else { // //movement within threshold, skip playing any animation and end the cue/event right after // eventPlayer.SkipPlay(workingLayer, MovementController.animationPackName); // } }