Improved movement animaitons

Added a SetBlendWeight event that sets the weight for all nodes with a name.
This commit is contained in:
viktorljung
2016-03-08 11:21:40 +01:00
parent c1f5cf65a7
commit 2ba245368b
13 changed files with 331 additions and 81 deletions
+23 -7
View File
@@ -443,18 +443,34 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
}
}
}
/* EntityWrapper dashEffectModel;
dashEffectModel = playerModel.Clone(dashEffect);
player["Transform"].Copy(dashEffectModel["Transform"]);
dashEffectModel.AttachComponent("ExplosionEffect");
dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"];
((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f;
(double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"];
(glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement());
auto animationChildren = dashEffectModel.ChildrenWithComponent("Animation");
for (auto animationEntity : animationChildren) {
(bool&)animationEntity["Animation"]["Play"] = false;
}*/
}
}
}
/*
auto playerEntityAnimation = playerModel["Animation"];
playerEntityModel.Copy(dashEffect["Model"]);
playerEntityAnimation.Copy(dashEffect["Animation"]);
dashEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"];
((glm::vec4&)dashEffect["ExplosionEffect"]["EndColor"]).w = 0.f;
*/