Godot 精灵动画恢复时从头播?对照 pause 和 stop
在 Godot 4 里记录帧序号和帧内进度,确定角色动作为什么在恢复时重头播放。


角色被菜单暂停后,恢复时突然回到起手姿势,先检查你在暂停分支调用了哪个方法。本例适用于 Godot 4 的 AnimatedSprite2D。
用同一段动作做两次对照
为节点放三帧容易区分的姿势,将动画设为低帧率。调用 play(),等到第二帧已经显示一段时间,记录 frame 和 frame_progress。第一次调用 pause(),停一秒再调用不带参数的 play()。第二次从同样位置调用 stop(),并在一秒后再次 play()。
看哪一层被重置
第一组暂停期间应保留当前帧及帧内进度,随后接着走。第二组的播放位置应重置,并且 stop() 还会把 custom_speed 重设为 1.0。如果两组都跳回起点,再查恢复路径是否切换了动画名、重新创建了节点,或又写了一次 frame。可以用精灵图集打包工具整理测试序列,然后在 Godot 内验收播放逻辑。
推荐使用本站工具

Sprite Sheet Splitter Guide: Extract Animation Frames for 2D Games
Learn how a sprite sheet splitter extracts clean animation frames from character sheets, VFX sheets, tiles, UI sprites, and AI-generated game assets.

Best Sprite Sheet Packer Settings for Indie Game Assets
A practical SEO-friendly guide to sprite sheet packer settings, including atlas size, padding, trimming, extrude, rotation, metadata, and recommended export settings for 2D game assets.

Smart Sprite Sheet Packer: A Practical Guide for 2D Game Developers
Learn how a smart sprite sheet packer helps indie game developers combine PNG assets into clean texture atlases with metadata for Unity, Cocos, Godot, and custom 2D game engines.
