/* * Stops the redirection at the given intersection. * Sets current intersection and current joint to the next point. * If this intersection is not the same intersection the user started, the rotation angle is added (bool addAngle). * */ private void stopRedirection(VirtualIntersection intersection, bool addAngle) { currentIntersection = intersection; currentJoint = currentIntersection.getJoint(); if (addAngle) { oldRotation += Mathf.Rad2Deg * -redirectionDirection * (angleWalkedOnRealCircle - angleWalkedOnVirtualCircle); //(Mathf.Abs(currentCurve.getAngle()) - Mathf.Abs(currentPath.getAngle())) * -redirectionDirection; } redirectionStarted = false; Debug.Log("Redirection stopped at joint: " + currentJoint.getLabel() + ", intersection: " + currentIntersection.getLabel() + " (old rotation: " + oldRotation + ")"); }
public string getLabel() { return(this.label + " (" + jointPoint.getLabel() + ")"); }