struct in UnityEngine.LowLevelPhysics2D
/
Implemented in:UnityEngine.Physics2DModule
Provides the ability to compose geometry using specific operations on layers in a specific order.
Property | Description |
---|---|
DefaultCurveStride | The default curve stride used when composing geometry with curves, in radians. Lower values produce more vertices, larger values fewer vertices. |
MinCurveStride | The minimum curve stride, in radians. |
Property | Description |
---|---|
isValid | Check if a Physics Composer is valid. |
layerCount | Get the number of layers currently added to the Physics Composer. |
layerHandles | Get the layer handles added to the Physics Composer. |
rejectedGeometryCount | Get the number of geometries that were rejected during the last Geometry Composition. Geometry can be rejected for a number of reasons such as vertices being collinear or too close etc. Whilst "pure" geometry is always valid, this geometry is meant to be used by physics which has constraints on what it can accept. All geometry successfully created will always be valid when used by physics. If you notice thin/small gaps in the composition, this is likely to be rejected geometry. Checking this property will help determine that. |
useDelaunay | Get/Set if Delaunay tessellation is to be used. |
Method | Description |
---|---|
AddLayer | Add a Circle Geometry layer to the Physics Composer. |
CreateChainGeometry | Create ChainGeometry from the composition by iterating all the layers added to the composition in the layer order specified, applying each operation specified. A limit is imposed on small vertex distances so it is recommended that scaling is applied here rather than on the returned geometry so geometry is not discarded due to it being invalid. |
CreatePolygonGeometry | Create PolygonGeometry from the composition by iterating all the layers added to the composition in the layer order specified, applying each operation specified. A limit is imposed on small vertex distances so it is recommended that scaling is applied here rather than on the returned geometry so geometry is not discarded due to it being invalid. |
Destroy | Destroy the Physics Composer. |
RemoveLayer | Remove a layer from the Physics Composer. |
Method | Description |
---|---|
Create | Create a Physics Composer. |