Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

物理属性

通过在 Blenders 物理选项卡中,启用“Rigid Body”(刚体)来导出物理属性:

../../../_images/enable_physics.png

重要

By default, a single Blender object with rigid body enabled will export as three nodes: a PhysicsBody, a CollisionShape, and a MeshInstance3D.

物体类型

Blender只有 "活动" 和 "不活动" 刚体的概念. 这些转变为Static和RigidBody节点. 要创建运动体, 请在 "活动" 物体上启用 "动画化" 复选框:

../../../_images/body_type.jpg

碰撞形状

Blender中缺少碰撞形状的许多参数, 并且许多碰撞形状也不存在. 但是, 支持Blender刚体碰撞和刚体动力学界面中的几乎所有选项:

../../../_images/collision_shapes.jpg
有以下注意事项:
  • 并非所有碰撞形状都受支持.Blender和Godot只同时支持 Mesh, Convex Hull, Capsule, SphereBox

  • 在Godot中, 您可以有不同的碰撞编组和碰撞遮罩. 在Blender中, 您只有碰撞编组. 因此, 导出对象的碰撞遮罩等于其碰撞编组. 大多数时候, 这就是您想要的.

重要

要构建复合物理形状, 请启用将刚体设置为多个对象的父级. 物理属性取自最高父级的刚体, 其余用作碰撞形状.

仅碰撞几何

通常, 你希望碰撞网格和图形网格有不同的几何形状, 但默认情况下, 导出器会将网格和碰撞形状一起导出, 要只导出碰撞形状, 请将对象的最大绘制类型设置为Wire:

../../../_images/col_only.png

这也将影响对象在Blender视图中的显示方式. 大多数时候, 您希望在处理模型时透明显示碰撞几何体, 因此效果很好.