mirror of
https://github.com/godotengine/godot
synced 2024-11-02 11:59:10 +00:00
c83718624f
Update links to outdated asset library demos Co-authored-by: Max Hilbrunner <m.hilbrunner@gmail.com>
36 lines
2.9 KiB
XML
36 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="ConcavePolygonShape3D" inherits="Shape3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
A 3D trimesh shape used for physics collision.
|
|
</brief_description>
|
|
<description>
|
|
A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape3D].
|
|
Being just a collection of interconnected triangles, [ConcavePolygonShape3D] is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, [ConcavePolygonShape3D] is [i]hollow[/i] even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.
|
|
[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [CollisionShape3D] nodes like [StaticBody3D] and will likely not behave well for [CharacterBody3D]s or [RigidBody3D]s in a mode other than Static.
|
|
[b]Warning:[/b] Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. [ConcavePolygonShape3D] is hollow, so it won't detect a collision.
|
|
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, [ConvexPolygonShape3D] should be used. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions.
|
|
</description>
|
|
<tutorials>
|
|
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/2747</link>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="get_faces" qualifiers="const">
|
|
<return type="PackedVector3Array" />
|
|
<description>
|
|
Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle.
|
|
</description>
|
|
</method>
|
|
<method name="set_faces">
|
|
<return type="void" />
|
|
<param index="0" name="faces" type="PackedVector3Array" />
|
|
<description>
|
|
Sets the faces of the trimesh shape from an array of vertices. The [param faces] array should be composed of triples such that each triple of vertices defines a triangle.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="backface_collision" type="bool" setter="set_backface_collision_enabled" getter="is_backface_collision_enabled" default="false">
|
|
If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals.
|
|
</member>
|
|
</members>
|
|
</class>
|