Update Vector3 slide to match godot implementation

It wasn't the same before and resulted in weird behavior, its better now.
pull/459/head
Silver1063 2020-10-11 15:47:01 -07:00
parent c9a740be34
commit a733457285
1 changed files with 1 additions and 1 deletions

View File

@ -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);