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.
33 lines
446 B
JSON
33 lines
446 B
JSON
{
|
|
"walk": {
|
|
"speed": 6.0,
|
|
"amplitude": 25.0
|
|
},
|
|
"run": {
|
|
"speed": 12.0,
|
|
"amplitude": 40.0
|
|
},
|
|
"body_bob": 0.03,
|
|
"head": {
|
|
"node": "Head",
|
|
"amplitude": 4.0
|
|
},
|
|
"legs": [
|
|
{
|
|
"node": "Foot_FL",
|
|
"phase": 0.0
|
|
},
|
|
{
|
|
"node": "Foot_FR",
|
|
"phase": 3.14159
|
|
},
|
|
{
|
|
"node": "Foot_HL",
|
|
"phase": 3.14159
|
|
},
|
|
{
|
|
"node": "Foot_HR",
|
|
"phase": 0.0
|
|
}
|
|
]
|
|
} |