diff options
Diffstat (limited to 'modules/mono/glue/Managed/Files/Vector3.cs')
-rw-r--r-- | modules/mono/glue/Managed/Files/Vector3.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/glue/Managed/Files/Vector3.cs b/modules/mono/glue/Managed/Files/Vector3.cs index f6ff27989d..0c96d346a9 100644 --- a/modules/mono/glue/Managed/Files/Vector3.cs +++ b/modules/mono/glue/Managed/Files/Vector3.cs @@ -126,6 +126,11 @@ namespace Godot ); } + public Vector3 DirectionTo(Vector3 b) + { + return new Vector3(b.x - x, b.y - y, b.z - z).Normalized(); + } + public real_t DistanceSquaredTo(Vector3 b) { return (b - this).LengthSquared(); |