From 177e62a7e4867a01ec17b42a527d8275c3bdfdef Mon Sep 17 00:00:00 2001 From: Addmix Date: Wed, 25 Nov 2020 17:35:27 -0700 Subject: Update skeleton_3d_editor_plugin.cpp --- editor/plugins/skeleton_3d_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor') diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 52da8dea19..ec9d87df85 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -387,6 +387,10 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi CollisionShape3D *bone_shape = memnew(CollisionShape3D); bone_shape->set_shape(bone_shape_capsule); + Transform capsule_transform; + capsule_transform.basis = Basis(Vector3(1, 0, 0), Vector3(0, 0, 1), Vector3(0, -1, 0)); + bone_shape->set_transform(capsule_transform); + Transform body_transform; body_transform.set_look_at(Vector3(0, 0, 0), child_rest.origin, Vector3(0, 1, 0)); body_transform.origin = body_transform.basis.xform(Vector3(0, 0, -half_height)); -- cgit v1.2.3