You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Explicitly documented that Transform.basis is not necessarily an orthogonal matrix.
Also added a check that in axis-angle rotations, axis is a normalized vector, and modified the docs accordingly. Fixes #8113.
This commit is contained in:
@@ -575,6 +575,8 @@ Basis::Basis(const Quat &p_quat) {
|
||||
Basis::Basis(const Vector3 &p_axis, real_t p_phi) {
|
||||
// Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle
|
||||
|
||||
ERR_FAIL_COND(p_axis.is_normalized() == false);
|
||||
|
||||
Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z);
|
||||
|
||||
real_t cosine = Math::cos(p_phi);
|
||||
|
||||
Reference in New Issue
Block a user