Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
private void Update() { if (!enableMovement) { return; } distanceTravelled = WrapDistanceOverSpline(distanceTravelled + speedMeterPerSec * Time.deltaTime); Position = spline.GetGeodesicPositionByDistance(distanceTravelled); //face the direction of motion var forwardPos = spline.GetGeodesicPositionByDistance(WrapDistanceOverSpline(distanceTravelled + 0.01f)); Forward = forwardPos - transform.position; }