Example #1
0
    Vector3 LerpMovement(GhostData data)
    {
        Node target = pathFinder.GetNodeInDirection(data.getCurrentNode(), data.getDirection());

        if (data.getLerpTime() > 1f)
        {
            data.setLerpTime(0f);
        }

        return(Vector3.Lerp(data.getCurrentNode().pos, target.pos, data.getLerpTime()));
    }