Game Development Reference
In-Depth Information
With your curve parameter available and configured, we can then alter our previous Lerp
function in the MapMovement script to use the curve parameter as follows:
if (TargetLocation != Vector3.zero && TargetLocation !=
transform.position && TargetLocation != StartLocation)
{
transform.position = Vector3.Lerp(StartLocation,
TargetLocation, MovementCurve.Evaluate(timer));
timer += Time.deltaTime;
}
Search WWH ::




Custom Search