Create physical skeleton collider orientation fix

(cherry picked from commit 177e62a7e4)
This commit is contained in:
Addmix 2020-11-25 17:35:27 -07:00 committed by Rémi Verschelde
parent 01acd46afc
commit 58f038d1fa
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -113,6 +113,10 @@ PhysicalBone *SkeletonEditor::create_physical_bone(int bone_id, int bone_child_i
CollisionShape *bone_shape = memnew(CollisionShape);
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.origin = Vector3(0, 0, -half_height);