From a733457285f26dae629e9625fcb13475a28577b7 Mon Sep 17 00:00:00 2001 From: Silver1063 Date: Sun, 11 Oct 2020 15:47:01 -0700 Subject: [PATCH] Update Vector3 slide to match godot implementation It wasn't the same before and resulted in weird behavior, its better now. --- include/core/Vector3.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/Vector3.hpp b/include/core/Vector3.hpp index d879097..16c2a10 100644 --- a/include/core/Vector3.hpp +++ b/include/core/Vector3.hpp @@ -264,7 +264,7 @@ struct Vector3 { void rotate(const Vector3 &p_axis, real_t p_phi); inline Vector3 slide(const Vector3 &by) const { - return by - *this * this->dot(by); + return *this - by * this->dot(by); } void snap(real_t p_val);