From 3d0f6c0d5faa3a07ced3382e1151f2b79ea5a9e6 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 21 八月 2018 14:00:17 +0800
Subject: [PATCH] update 角色被拉
---
Utility/MathUtility.cs | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Utility/MathUtility.cs b/Utility/MathUtility.cs
index 3a162b0..ec01aa7 100644
--- a/Utility/MathUtility.cs
+++ b/Utility/MathUtility.cs
@@ -154,6 +154,21 @@
return (target - self).normalized;
}
+ public static bool IsSameDir(Vector3 vec1, Vector3 vec2)
+ {
+ vec1.y = 0;
+ vec2.y = 0;
+
+ return Vector3.Dot(vec1, vec2) > 0;
+ }
+
+ public static bool OppositeDir(Vector3 vec1, Vector3 vec2)
+ {
+ vec1.y = 0;
+ vec2.y = 0;
+
+ return Vector3.Dot(vec1, vec2) < 0;
+ }
public static int Power(int a, int e)
{
int value = 1;
--
Gitblit v1.8.0