Esempio n. 1
0
        public static FVector3 Project(FVector3 vector, FVector3 onNormal)
        {
            fint num = FVector3.Dot(onNormal, onNormal);

            if (num.raw < 1)
            {
                return(FVector3.zero);
            }
            return(onNormal * FVector3.Dot(vector, onNormal) / num);
        }
Esempio n. 2
0
 //
 // Static Methods
 //
 public static fint Angle(FVector3 from, FVector3 to)
 {
     return(FMath.Acos(FMath.Clamp(FVector3.Dot(from.normalized, to.normalized), -fint.one, fint.one)) * FMath.Rad2Deg);
 }
Esempio n. 3
0
 public static FVector3 Reflect(FVector3 inDirection, FVector3 inNormal)
 {
     return(fint.CreateFromInt(2) * FVector3.Dot(inNormal, inDirection) * inNormal + inDirection);
 }