SuperAPI AI 工具集

godot-physics-3d

通用与其它

查看项目

更新于 10-15 21:06

技能介绍

用途:为 Godot 3D 物理(Jolt/原生)提供高性能模拟的专家模式,涵盖刚体选择、CCD、楼梯、载具、布娃娃、SoftBody,并通过脚本落地。触发关键词包括 RigidBody3D、PhysicalBone3D、Jolt、Ragdoll、Skeleton3D、Joint3D、PinJoint3D、HingeJoint3D、Generic6DOFJoint3D、RayCast3D、PhysicsDirectSpaceState3D。

主要能力:按“需求/症状”决策树选择物理体与 API,例如角色移动与楼梯斜坡用 CharacterBody3D,碎片与道具用 RigidBody3D,竞速轮式用 VehicleBody3D,死亡过渡用 PhysicalBone3D,布料用 SoftBody3D,子弹穿透用 CCD 或 PhysicsServer3D,关节断裂用 Joint3D,重力井用 Area3D,视线检测用 DirectSpaceState。附带脚本包括 kinematic_3d_stairs_logic.gd、shapecast_3d_ground_check.gd、ragdoll_manager.gd、vehicle_simulation_tuning.gd、soft_body_3d_interaction.gd、physics_ccd_3d_projectile.gd、physics_server_3d_bullets.gd、physics_layers_3d_config.gd、custom_gravity_well_3d.gd、joint_3d_breakage_logic.gd、ray_query_3d_vision.gd、raycast_visualizer.gd。

使用方式:先按决策树选定物理体并加载对应脚本,再编写移动或模拟代码;不要在 _process() 中移动 PhysicsBody3D,应使用 _physics_process();不要直接缩放碰撞形状,改用 shape 的高度、半径、尺寸属性;不要直接修改 RigidBody3D 变换,改用 apply_impulse()、apply_torque() 或 _integrate_forces();平台跳跃玩家控制器用 CharacterBody3D 配合 move_and_slide();CCD 仅用于高速小物体;PhysicsServer3D 的 RID 需手动 free_rid();楼梯地面检测用 ShapeCast3D 而非单条 RayCast3D;正确设置 collision_layer 与 collision_mask;Area3D 用于检测而非高频阻挡。

适用场景:刚体模拟、角色物理、载具、布娃娃、软体、弹道、关节破坏、自定义重力与 AI 视线。限制:资料未提供收费、价格、平台与效果数据;Jolt 与 Godot Physics 存在关节属性差异,版本升级步骤见 migration-notes.md,具体 API 细节需查阅官方文档。