mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Change the rotate function of Spatial to be local, makes more sense. Closes #14569
This commit is contained in:
@@ -311,6 +311,15 @@ void Basis::rotate(const Vector3 &p_axis, real_t p_phi) {
|
||||
*this = rotated(p_axis, p_phi);
|
||||
}
|
||||
|
||||
void Basis::rotate_local(const Vector3 &p_axis, real_t p_phi) {
|
||||
|
||||
*this = rotated_local(p_axis, p_phi);
|
||||
}
|
||||
Basis Basis::rotated_local(const Vector3 &p_axis, real_t p_phi) const {
|
||||
|
||||
return (*this) * Basis(p_axis, p_phi);
|
||||
}
|
||||
|
||||
Basis Basis::rotated(const Vector3 &p_euler) const {
|
||||
return Basis(p_euler) * (*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user