mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-03 18:09:13 +03:00
Update Vector3 slide to match godot implementation
It wasn't the same before and resulted in weird behavior, its better now.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user