using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace Framework.Extensions
{
    public static class Vector3Extended
    {
        public static Vector3 ProjectRelative(this Vector3 vector, Transform transform, Vector3 axisMask)
        {
            return
                ((transform.forward * Vector3.Dot(vector, transform.forward)) * axisMask.x) +
                ((transform.up * Vector3.Dot(vector, transform.up)) * axisMask.y) +
                ((transform.right * Vector3.Dot(vector, transform.right)) * axisMask.z);
        }
    }
}
