mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(creatures): animate creature walk cycles
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.
This commit is contained in:
33
assets/model/creature/pig/animation.json
Normal file
33
assets/model/creature/pig/animation.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user