Bump sdk to Granny-aligned curve sampling; loop motions use the loop window
sdk de8fa40: B-spline loop window, cubic curves, degree-0 first-knot>t. ActorInstance passes the motion's loop flag to SetAnimationLoop so looping motions sample across the seam instead of clamping to the end knots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ff8667e3b9
commit
a34b9c5a49
+1
-1
Submodule sdk updated: 86759bb726...de8fa40098
@@ -280,6 +280,7 @@ bool ActorInstance::PlayMotion(MotionType type, bool loop) {
|
|||||||
m_animTime = 0.0f;
|
m_animTime = 0.0f;
|
||||||
m_motionDuration = std::max(0.1f, m_model->GetAnimationDuration());
|
m_motionDuration = std::max(0.1f, m_model->GetAnimationDuration());
|
||||||
m_loopMotion = loop;
|
m_loopMotion = loop;
|
||||||
|
m_model->SetAnimationLoop(loop, loop);
|
||||||
|
|
||||||
if (type == MotionType::Attack || type == MotionType::ComboAttack1 ||
|
if (type == MotionType::Attack || type == MotionType::ComboAttack1 ||
|
||||||
type == MotionType::ComboAttack2 || type == MotionType::ComboAttack3 ||
|
type == MotionType::ComboAttack2 || type == MotionType::ComboAttack3 ||
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ float Gr2ModelInstance::GetAnimationDuration() const {
|
|||||||
return m_impl ? m_impl->GetAnimationDuration() : 0.0f;
|
return m_impl ? m_impl->GetAnimationDuration() : 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gr2ModelInstance::SetAnimationLoop(bool underflow_loop, bool overflow_loop) {
|
||||||
|
if (m_impl) m_impl->SetAnimationLoop(underflow_loop, overflow_loop);
|
||||||
|
}
|
||||||
|
|
||||||
bool Gr2ModelInstance::GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time) const {
|
bool Gr2ModelInstance::GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time) const {
|
||||||
return m_impl ? m_impl->GetBoneWorldTransform(bone_name, out_matrix, animation_time) : false;
|
return m_impl ? m_impl->GetBoneWorldTransform(bone_name, out_matrix, animation_time) : false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public:
|
|||||||
// Load external animation (.gr2) to animate this model
|
// Load external animation (.gr2) to animate this model
|
||||||
bool LoadExternalAnimation(const std::string& anim_filepath);
|
bool LoadExternalAnimation(const std::string& anim_filepath);
|
||||||
float GetAnimationDuration() const;
|
float GetAnimationDuration() const;
|
||||||
|
// Granny loop window: looping motions pass (true, true) so the seam samples across loops.
|
||||||
|
void SetAnimationLoop(bool underflow_loop, bool overflow_loop);
|
||||||
|
|
||||||
// Bone queries & attachments
|
// Bone queries & attachments
|
||||||
bool GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time = -1.0f) const;
|
bool GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time = -1.0f) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user