Shape¶
Inherits: Resource < Reference < Object
Inherited By: BoxShape, CapsuleShape, ConcavePolygonShape, ConvexPolygonShape, CylinderShape, HeightMapShape, PlaneShape, RayShape, SphereShape
所有 3D 形状资源的基类。
描述¶
所有3D形状资源的基类。继承于此的节点可以作为PhysicsBody或Area对象的形状。
教程¶
属性¶
|
方法¶
get_debug_mesh ( ) |
属性说明¶
float margin
Default |
|
Setter |
set_margin(value) |
Getter |
get_margin() |
形状的碰撞边距。只在Bullet物理运算中使用。
碰撞边距允许通过在形状周围添加额外的外壳来使碰撞检测更有效。当物体重叠的部分超过其边距时,碰撞算法的成本会更高,所以边距的数值越高对性能越好,但代价是边缘的精度会降低。
方法说明¶
ArrayMesh get_debug_mesh ( )
返回用于绘制此Shape
的调试碰撞的ArrayMesh。