I am able to export two rotation animations on corresponding two objects.
However what is created in the GLTF file is actually two animation sections called “action1” and “action2”.
What I need is just one final “action” since I want my 2 animations to be started at the same time.
I know GLTF can do this, because I have managed to manipulate the exported GLTF file so that my two animations are merged correctly into one single “action”.
This is the GLTF from three (only the animation part):
"animations": [
{
"name": "Action1",
"samplers": [
{
"input": 8,
"output": 9,
"interpolation": "LINEAR"
}
],
"channels": [
{
"sampler": 0,
"target": {
"node": 0,
"path": "rotation"
}
}
]
},
{
"name": "Action2",
"samplers": [
{
"input": 10,
"output": 11,
"interpolation": "LINEAR"
}
],
"channels": [
{
"sampler": 0,
"target": {
"node": 1,
"path": "rotation"
}
}
]
}
]
and here is my manipulated animation part:
"animations": [
{
"name": "Action",
"samplers": [
{
"input": 8,
"output": 9,
"interpolation": "LINEAR"
},
{
"input": 10,
"output": 11,
"interpolation": "LINEAR"
}
],
"channels": [
{
"sampler": 0,
"target": {
"node": 0,
"path": "rotation"
}
},
{
"sampler": 0,
"target": {
"node": 1,
"path": "rotation"
}
}
]
}
]
So instead of having two separate samplers and channels they are joined. How can I do this in three?