1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add is_zero_approx methods to Vector2, 3, and 4

This commit is contained in:
Jonathan Nicholl
2022-09-01 20:32:33 -04:00
parent c6fd311da0
commit 15d057c521
26 changed files with 70 additions and 31 deletions

View File

@@ -681,7 +681,7 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
}
if (!found) {
for (int i = 0; i < search_path.size(); i++) {
if (Vector3(0, 0, 0).is_equal_approx(skeleton->get_bone_global_rest(search_path[i]).origin)) {
if (skeleton->get_bone_global_rest(search_path[i]).origin.is_zero_approx()) {
bone_idx = search_path[i]; // The bone existing at the origin is appropriate as a root.
found = true;
break;