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.
Checking the stable version of the documentation...
Shape3D
继承: Resource < RefCounted < Object
派生: BoxShape3D, CapsuleShape3D, ConcavePolygonShape3D, ConvexPolygonShape3D, CylinderShape3D, HeightMapShape3D, SeparationRayShape3D, SphereShape3D, WorldBoundaryShape3D
用于物理碰撞的 3D 形状的抽象基类。
描述
所有 3D 形状的抽象基类,针对物理使用设计。
性能:对图元形状进行碰撞检测很快,尤其是 SphereShape3D。ConvexPolygonShape3D 和 HeightMapShape3D 较慢,ConcavePolygonShape3D 最慢。
教程
属性
|
||
|
方法
属性说明
float custom_solver_bias = 0.0 🔗
该形状的自定义求解器偏差(Custom Solver Bias)。它定义了当该形状参与碰撞时,刚体为了强制分离接触点而产生的反应强度。
当设置为 0 时,将使用 ProjectSettings.physics/3d/solver/default_contact_bias 中定义的默认值。
注意: custom_solver_bias 仅在使用 GodotPhysics3D 物理引擎时生效。在使用 Jolt Physics 时,该参数没有任何效果。
该形状的碰撞边距。Godot Physics 中未使用。
碰撞边距允许通过在形状周围添加额外的外壳来使碰撞检测更有效。当物体重叠的部分超过其边距时,碰撞算法的成本会更高,所以边距的数值越高对性能越好,但代价是边缘的精度会降低,因为会让边缘的锐度降低。
方法说明
返回用于绘制此 Shape3D 的调试碰撞的 ArrayMesh。