Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CircleGeometry

The geometry of a closed circle. See PhysicsBody.CreateShape.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct CircleGeometry

Static Fields

Value

Description

defaultGeometryGet the default Circle.

Constructors

Constructor

Description

CircleGeometry()Create a default Circle. See _defaultGeometry.

Properties

Property

Description

centerThe local center.
isValidCheck if the geometry is valid or not.
radiusThe radius.

Methods

Method

Description

CalculateAABBCalculate the AABB of the geometry.
CalculateMassConfigurationCalculate the mass configuration of the geometry.
CastRayCalculate if a world ray intersects the geometry. See PhysicsQuery.CastResult.
CastShapeCalculate if a cast shape intersects the geometry. Initially touching shapes are treated as a miss. You should check for overlap first if initial overlap is required. See PhysicsQuery.CastShapeInput and PhysicsQuery.CastResult.
ClosestPointCalculate the closest point on this geometry to the specified point.
CreateShapeProxyCreate a shape proxy from the geometry.
IntersectCheck the intersection between this geometry and another.
InverseTransformInverse-Transform the geometry.
OverlapPointCalculate if a point overlaps the geometry.
ToPolygonsCreates multiple PolygonGeometry from the geometry. A limit is imposed on small vertex distances so it is recommended that the geometry is scaled appropriately rather than on the returned geometry so geometry is not discarded due to it being invalid.
TransformTransform the geometry.

Static Methods

Method

Description

CreateCreate Circle.
InverseTransformInverse-Transform a batch of geometry in place.
TransformTransform a batch of geometry in place.