Exemplo n.º 1
0
        protected Vector2 OffsetDirection(Vector2 originPosition, Vector2 direction, float distance, float max)
        {
            var angle = 90 - Utilites.AngleInDeg(originPosition, direction);

            return(originPosition + AngleToDirection(angle, false) * (Mathf.Min(max, distance + OffsetRay)));
        }