Documentation
¶
Overview ¶
A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a graphics.gd/classdb/CollisionShape3D.
Being just a collection of interconnected triangles, graphics.gd/classdb/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, graphics.gd/classdb/ConcavePolygonShape3D is hollow even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.
Note: When used for collision, graphics.gd/classdb/ConcavePolygonShape3D is intended to work with static graphics.gd/classdb/CollisionShape3D nodes like graphics.gd/classdb/StaticBody3D and will likely not behave well for [graphics.gd/classdb/CharacterBody3D]s or [graphics.gd/classdb/RigidBody3D]s in a mode other than Static.
Warning: 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. graphics.gd/classdb/ConcavePolygonShape3D is hollow, so it won't detect a collision.
Performance: Due to its complexity, graphics.gd/classdb/ConcavePolygonShape3D is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, graphics.gd/classdb/ConvexPolygonShape3D should be used. For dynamic physics bodies that need concave collision, several [graphics.gd/classdb/ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see graphics.gd/classdb/ConvexPolygonShape3D's documentation for instructions.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsConcavePolygonShape3D() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsShape3D() Shape3D.Instance
- func (self Instance) BackfaceCollision() bool
- func (self Instance) Data() []Vector3.XYZ
- func (self Instance) ID() ID
- func (self Instance) SetBackfaceCollision(value bool)
- func (self Instance) SetData(value []Vector3.XYZ)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsConcavePolygonShape3D ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.ConcavePolygonShape3D
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsConcavePolygonShape3D ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted