CollisionPolygon3D
向 CollisionObject3D 父級提供加厚多邊形形狀(角柱體)的節點。
說明
向 CollisionObject3D 父級提供加厚多邊形形狀(角柱體)的節點,能夠為這個形狀提供編輯的方法。該多邊形可以是凹多邊形,也可以是凸多邊形。能夠為 Area3D 提供偵測形狀,也能夠將 PhysicsBody3D 變為實體。
警告:非均勻縮放的 CollisionShape3D 應該無法按預期工作。請確保它在所有軸上的縮放是一致的,可以用對形狀資源的調整來代替非均勻縮放。
屬性
|
||
|
||
|
||
|
||
|
||
|
屬性說明
Color debug_color = Color(0, 0, 0, 0) 🔗
The collision shape color that is displayed in the editor, or in the running project if Debug > Visible Collision Shapes is checked at the top of the editor.
Note: The default value is ProjectSettings.debug/shapes/collision/shape_color. The Color(0, 0, 0, 0) value documented here is a placeholder, and not the actual default debug color.
If true, when the shape is displayed, it will show a solid fill color in addition to its wireframe.
產生的碰撞沿著與 2D 多邊形垂直的任意方向深入的長度。
If true, no collision will be produced. This property should be changed with Object.set_deferred().
生成的 Shape3D 的碰撞邊距。詳情見 Shape3D.margin。
PackedVector2Array polygon = PackedVector2Array() 🔗
void set_polygon(value: PackedVector2Array)
PackedVector2Array get_polygon()
Array of vertices which define the 2D polygon in the local XY plane.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector2Array for more details.