Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

姿态动画总是从第0帧开始播,不会跟随 #18029

Open
chencong1992 opened this issue Dec 12, 2024 · 1 comment
Open

姿态动画总是从第0帧开始播,不会跟随 #18029

chencong1992 opened this issue Dec 12, 2024 · 1 comment
Assignees
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@chencong1992
Copy link

Cocos Creator version

3.8.2 3.8.4

System information

Chorme浏览器、IDE预览

Issue description

相关问题记录和demo可以看这个飞书文档:https://vcnsffkg2drx.feishu.cn/wiki/P1HUw9K8GiXvAZkyBZjc09FBnKb?pre_pathname=%2Fdrive%2Fhome%2F
这个骨骼动画里面有姿态动画(脸部表情),如果从第0帧播放,动作和姿态动画都是正常的。如果K了动作,从第n帧到第m帧,这时候在IDE和运行中播放,脸部表情仍然是从第0帧播放的,脸部表情跟身份就不同步了
看了代码,包含轨道动画时,curve计算的时间始终是从当前clip的当前时间,实际应该加上clip的第n帧的时间,即x帧(n <x < m) 时,计算的是第x帧的姿态权重,实际应该计算n+x帧的姿态权重
理论上传入时间的时候,加上clip的起始时间就正常了,但是clip里没看到对应的属性记录clip的起始时间
手动加了个接口传这个起始时间,测试效果就正常了

下附代码:
应用层:
image

引擎层:
image
image

Relevant error log output

No response

Steps to reproduce

Minimal reproduction project

No response

@chencong1992 chencong1992 added Bug Needs Triage Needs to be assigned by the team labels Dec 12, 2024
@chencong1992
Copy link
Author

我发现这个可能是ide打包的bug,当我的动作文件变长时,之前300K的.cconb文件会变成1.1M,看上面飞书文档里的断点截图也发现curve里能访问到完整的blendershape动画。所以只要让生成的cconb文件回归正常,这个问题自然就解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants