mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix switch clip cause baked animation frame index to -1 (#14322)
This commit is contained in:
@@ -487,8 +487,9 @@ export class JointAnimationInfo {
|
||||
|
||||
public switchClip (info: IAnimInfo, clip: AnimationClip | null) {
|
||||
info.currentClip = clip;
|
||||
info.data[0] = -1;
|
||||
info.data[0] = 0; // reset default frame 0
|
||||
info.buffer.update(info.data);
|
||||
info.data[0] = -1; // reset frame index to -1. sampleCurves will calculate frame to 0.
|
||||
info.dirty = false;
|
||||
if (JSB) {
|
||||
info.dirtyForJSB[0] = 0;
|
||||
|
||||
Reference in New Issue
Block a user