:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ConvexPolygonShape3D.xml. .. _class_ConvexPolygonShape3D: ConvexPolygonShape3D ==================== **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Convex polygon shape resource for 3D physics. Description ----------- 3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, ``ConvexPolygonShape3D`` cannot store concave polygon shapes. :ref:`ConvexPolygonShape2D`\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. \ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* ``ConvexPolygonShape3D``\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. \ **Performance:** ``ConvexPolygonShape3D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. Tutorials --------- - `3D Physics Tests Demo `__ Properties ---------- +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ | :ref:`PackedVector3Array` | :ref:`points` | ``PackedVector3Array()`` | +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ Property Descriptions --------------------- .. _class_ConvexPolygonShape3D_property_points: - :ref:`PackedVector3Array` **points** +-----------+--------------------------+ | *Default* | ``PackedVector3Array()`` | +-----------+--------------------------+ | *Setter* | set_points(value) | +-----------+--------------------------+ | *Getter* | get_points() | +-----------+--------------------------+ The list of 3D points forming the convex polygon shape. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`