You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
[3.x] Expose determinant in Transform2D, rename internal method
This commit is contained in:
@@ -1623,7 +1623,7 @@ void CanvasItemEditor::_solve_IK(Node2D *leaf_node, Point2 target_position) {
|
||||
Point2 current = (joints_list[node_id - 1]->get_global_position() - joints_list[node_id]->get_global_position()).normalized();
|
||||
Point2 target = (joints_pos[node_id - 1] - joints_list[node_id]->get_global_position()).normalized();
|
||||
float rot = current.angle_to(target);
|
||||
if (joints_list[node_id]->get_global_transform().basis_determinant() < 0) {
|
||||
if (joints_list[node_id]->get_global_transform().determinant() < 0) {
|
||||
rot = -rot;
|
||||
}
|
||||
joints_list[node_id]->rotate(rot);
|
||||
|
||||
Reference in New Issue
Block a user