Add keyframe support to attach.
Limitations: - Supports attaching a single keyframe. If multiple keyframes are present in the child, only the first one will be attached. - Does not support time, ctrl, mpos, mquat. - If mjs_detachBody is used, all keyframes are removed. PiperOrigin-RevId: 662517666 Change-Id: If6e3839471e1884afc14e1a75e7ce1957c2f3581
This commit is contained in:
committed by
Copybara-Service
parent
98cd49d529
commit
19aa68c2b2
@@ -101,7 +101,7 @@ void mj_recompile(mjSpec* s, const mjVFS* vfs, mjModel* m, mjData* d) {
|
||||
modelC->Compile(vfs, &m);
|
||||
if (d) {
|
||||
modelC->MakeData(m, &d);
|
||||
modelC->RestoreState(d->qpos, d->qvel, d->act);
|
||||
modelC->RestoreState(m->qpos0, d->qpos, d->qvel, d->act);
|
||||
d->time = time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user