mesh_collider2d
How the node's collider2d turns its mesh into a shape: the shape a fit takes, the edges a polyline keeps, how a convex_polygon and a voxelized outline…
Di halaman ini
2d · physics · 10 properties · 2D
How the node's collider2d turns its mesh into a shape: the shape a fit takes, the edges a polyline keeps, how a convex_polygon and a voxelized outline are read, and what a triangle_mesh tidies first.
In a scene, mesh_collider2d is the node key that applies it. A script reaches each property below as a field on node.mesh_collider2d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.mesh_collider2d.get() and node.mesh_collider2d.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
connected_components |
bool | false |
Work out which triangles form each separate piece of the mesh |
drop_bad_topology |
bool | false |
Drop the triangles that stop the mesh's edge topology from being built |
drop_degenerate_triangles |
bool | true |
Drop triangles that name one vertex twice; merges vertices too |
drop_duplicate_triangles |
bool | true |
Drop a triangle whose three vertices another one already names; merges vertices too |
fill |
enum | solid |
Whether voxelizing an outline fills its inside or only its edge, for voxelized_mesh and a vhacd or voxels decomposition One of solid, surface. |
fill_cavities |
bool | false |
When a solid fill floods an outline, leave the holes it walls off empty |
fix_self_intersections |
bool | false |
When a solid fill floods an outline, handle the places it crosses itself |
merge_vertices |
bool | true |
Merge vertices at exactly the same place when building a triangle_mesh |
oriented |
bool | false |
Treat a triangle_mesh or polyline as one-sided: the winding decides which side is solid, counter-clockwise enclosing the solid |
topology |
bool | false |
Build the mesh's half-edge topology |