Add capybara
This commit is contained in:
@@ -62,7 +62,17 @@ void Animator::addClip(std::shared_ptr<SkeletalAnimation> clip) {
|
||||
|
||||
void Animator::play(const std::string& name, float blendTime) {
|
||||
auto it = m_clips.find(name);
|
||||
if (it == m_clips.end()) return;
|
||||
if (it == m_clips.end()) {
|
||||
spdlog::warn("Animator::play failed. Clip '{}' not found.", name);
|
||||
|
||||
spdlog::info("Available clips:");
|
||||
for (const auto& [clipName, _] : m_clips)
|
||||
spdlog::info(" - '{}'", clipName);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
spdlog::info("Animator playing clip '{}'", name);
|
||||
|
||||
if (m_current.clip && blendTime > 0.f) {
|
||||
m_previous = m_current;
|
||||
@@ -73,7 +83,7 @@ void Animator::play(const std::string& name, float blendTime) {
|
||||
m_blendT = 1.f;
|
||||
}
|
||||
|
||||
m_current = { it->second.get(), 0.f, 1.f };
|
||||
m_current = { it->second.get(), 0.f, 1.f };
|
||||
m_currentClipName = name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user