mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Fix for SkeletonIK3D interpolation and bone roll
Fix bug in internal Basis::rotate_to_align function (also used with identity Basis in scene/resources/curve.cpp) Use ChainItem children rather than local bone rest to determine IK bone roll to match Godot 3.x behavior
This commit is contained in:
@@ -397,7 +397,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.0f, 1.0f);
|
||||
const real_t angle_rads = Math::acos(dot);
|
||||
set_axis_angle(axis, angle_rads);
|
||||
*this = Basis(axis, angle_rads) * (*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user