mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
Apparently Basis::rotate_to_align had a bug. Ported the fix by lyuma from: 6dfa6fc50e
This commit is contained in:
parent
039f173de1
commit
9e326c3000
@ -412,7 +412,7 @@ void Basis::rotate_to_align(Vector3 p_start_direction, Vector3 p_end_direction)
|
||||
real_t dot = p_start_direction.dot(p_end_direction);
|
||||
dot = CLAMP(dot, -1.0, 1.0);
|
||||
const real_t angle_rads = Math::acos(dot);
|
||||
set_axis_angle(axis, angle_rads);
|
||||
*this *= Basis(axis, angle_rads);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user