Merge pull request #187 from teamfisk/BoneAttachmentFix
Inverse seems to be the same as -w
This commit is contained in:
@@ -51,8 +51,7 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp
|
|||||||
glm::decompose(boneTransform, scale, rotation, translation, skew, perspective);
|
glm::decompose(boneTransform, scale, rotation, translation, skew, perspective);
|
||||||
|
|
||||||
rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation;
|
rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation;
|
||||||
|
rotation = glm::inverse(rotation);
|
||||||
rotation.w = -rotation.w;
|
|
||||||
glm::vec3 angles = glm::eulerAngles(rotation);
|
glm::vec3 angles = glm::eulerAngles(rotation);
|
||||||
|
|
||||||
if ((bool)entity["BoneAttachment"]["InheritPosition"]) {
|
if ((bool)entity["BoneAttachment"]["InheritPosition"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user