mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
Add a Gait component synchronized over the network and procedural animation for model nodes. Load animation parameters from assets/model/creature/pig/animation.json and apply leg swing, body bob, and head motion based on gait. Refactor Gait into its own header for reuse.
14 lines
247 B
C++
14 lines
247 B
C++
#pragma once
|
|
|
|
#include "Cubed/gameplay/gait.hpp"
|
|
namespace Cubed {
|
|
|
|
struct WalkPose {
|
|
Gait gait = Gait::STOP;
|
|
// for arm roll caculate
|
|
float walk_time = 0.0f;
|
|
// for sound play
|
|
float moving_time = 0.0f;
|
|
};
|
|
|
|
} // namespace Cubed
|