Merge remote-tracking branch 'origin/master' into Dirtybit

# Conflicts:
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Core/Transform.cpp
#	src/Engine/Editor/EditorSystem.cpp
#	src/Engine/Rendering/AnimationSystem.cpp
#	src/Engine/Rendering/BoneAttachmentSystem.cpp
#	src/Game/Systems/CapturePointSystem.cpp
#	src/Game/Systems/ExplosionEffectSystem.cpp
#	src/Game/Systems/PlayerMovementSystem.cpp
This commit is contained in:
2016-03-12 03:37:29 +01:00
220 changed files with 61854 additions and 9148 deletions
@@ -50,13 +50,15 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp
glm::vec4 perspective;
glm::decompose(boneTransform, scale, rotation, translation, skew, perspective);
glm::vec3 angles = glm::vec3(-glm::pitch(rotation), -glm::yaw(rotation), -glm::roll(rotation));
rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation;
rotation = glm::inverse(rotation);
glm::vec3 angles = glm::eulerAngles(rotation);
if ((bool)entity["BoneAttachment"]["InheritPosition"]) {
entity["Transform"]["Position"] = translation + (glm::vec3)entity["BoneAttachment"]["PositionOffset"];
}
if ((bool)entity["BoneAttachment"]["InheritOrientation"]) {
entity["Transform"]["Orientation"] = angles + (glm::vec3)entity["BoneAttachment"]["OrientationOffset"];
entity["Transform"]["Orientation"] = angles;
}
if ((bool)entity["BoneAttachment"]["InheritScale"]) {
entity["Transform"]["Scale"] = scale * (glm::vec3)entity["BoneAttachment"]["ScaleOffset"];