SuperAPI AI 工具集

animation-system

设计与创作

查看项目

更新于 10-15 22:40

技能介绍

用途:在 Godot 4.3+ 项目中实现动画,涵盖 AnimationPlayer、AnimationTree、混合树、状态机、精灵动画与代码驱动动画,示例均面向 4.3+ 且不使用已废弃 API,先给 GDScript 再给 C#。

主要能力:AnimationPlayer 用于简单播放与一次性效果,可动画任意节点属性、方法调用与音频;AnimationTree 用于混合、过渡与分层动画,根节点可选 AnimationNodeStateMachine 或 AnimationNodeBlendTree。支持播放控制(play、play_backwards、queue、stop、pause、speed_scale、seek)、animation_finished 信号、Call Method 轨道、AnimatedSprite2D 帧动画、BlendSpace1D/2D 连续混合、骨骼修改器(LookAtModifier3D、SpringBoneSimulator3D、BoneConstraint3D)、动画标记、重定向与 IKModifier3D 系列解算器。

使用方式:AnimationPlayer 作为被动画节点的直接子节点;需要混合时添加 AnimationTree,设置 anim_player 指向 AnimationPlayer 并 active=true;状态机通过 anim_tree["parameters/playback"] 缓存 AnimationNodeStateMachinePlayback,用 travel() 过渡、start() 立即切换;混合树每帧写入 blend_position 参数。

适用场景:2D/3D 角色移动、攻击连招、受击闪白、头发与披风摆动、头部注视、手脚 IK 等。

限制:部分特性有版本要求(骨骼修改器 4.4+、BoneConstraint3D 4.5+、IKModifier3D 4.6+、标记 4.4+、重定向 4.3+);4.7 起 SpriteFrames 循环模式、BlendSpace 的 sync_mode、LookAtModifier3D.relative 默认值有变更,迁移时需注意。具体收费、平台与效果资料暂未提供。