summaryrefslogtreecommitdiff
path: root/scene/3d/skeleton_ik_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/skeleton_ik_3d.h')
-rw-r--r--scene/3d/skeleton_ik_3d.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/scene/3d/skeleton_ik_3d.h b/scene/3d/skeleton_ik_3d.h
index 6c1db6dd33..eefecf68bb 100644
--- a/scene/3d/skeleton_ik_3d.h
+++ b/scene/3d/skeleton_ik_3d.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,15 +54,13 @@ class FabrikInverseKinematic {
BoneId bone = -1;
PhysicalBone3D *pb = nullptr;
- real_t length = 0;
+ real_t length = 0.0;
/// Positions relative to root bone
Transform initial_transform;
Vector3 current_pos;
// Direction from this bone to child
Vector3 current_ori;
- ChainItem() {}
-
ChainItem *find_child(const BoneId p_bone_id);
ChainItem *add_child(const BoneId p_bone_id);
};
@@ -80,7 +78,7 @@ class FabrikInverseKinematic {
struct Chain {
ChainItem chain_root;
- ChainItem *middle_chain_item;
+ ChainItem *middle_chain_item = nullptr;
Vector<ChainTip> tips;
Vector3 magnet_position;
};
@@ -130,7 +128,7 @@ class SkeletonIK3D : public Node {
StringName root_bone;
StringName tip_bone;
- real_t interpolation = 1;
+ real_t interpolation = 1.0;
Transform target;
NodePath target_node_path_override;
bool override_tip_basis = true;