ChainShape

Available since LÖVE 0.8.0
This shape is not supported in earlier versions.

A ChainShape consists of multiple line segments. It can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.

Unlike the PolygonShape, the ChainShape does not have a vertices limit or has to form a convex shape, but self intersections are not supported.

Constructors

love.physics.newChainShapeCreates a new ChainShape.Added since 0.8.0

Functions

ChainShape:getChildEdgeReturns a child of the shape as an EdgeShape.Added since 0.8.0
ChainShape:getPointReturns a point of the shape.Added since 0.8.0
ChainShape:getPointsReturns all points of the shape.Added since 0.8.0
ChainShape:getVertexCountReturns the number of vertices the shape has.Added since 0.8.0
ChainShape:setNextVertexSets a vertex that establishes a connection to the next shape.Added since 0.8.0
ChainShape:setPrevVertexSets a vertex that establishes a connection to the previous shape.Added since 0.8.0 Removed in 0.9.0
ChainShape:setPreviousVertexSets a vertex that establishes a connection to the previous shape.Added since 0.9.0
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.
Shape:computeAABBReturns the points of the bounding box for the transformed shape.Added since 0.8.0
Shape:computeMassComputes the mass properties for the shape.Added since 0.8.0
Shape:destroyExplicitly destroys the Shape. Removed in 0.8.0
Shape:getBodyGet the body the shape is attached to.Added since 0.7.0 Removed in 0.8.0
Shape:getBoundingBoxGets the bounding box of the shape. Removed in 0.8.0
Shape:getCategoryGets the categories this shape is a member of. Removed in 0.8.0
Shape:getCategoryBitsGets the categories as a 16-bit integer. Removed in 0.8.0
Shape:getChildCountReturns the number of children the shape has.Added since 0.8.0
Shape:getDataGet the data set with setData. Removed in 0.8.0
Shape:getDensityGets the density of the Shape. Removed in 0.8.0
Shape:getFilterDataGets the filter data of the Shape. Removed in 0.8.0
Shape:getFrictionGets the friction of this shape. Removed in 0.8.0
Shape:getMaskGets which categories this shape should NOT collide with. Removed in 0.8.0
Shape:getRadiusGets the radius of the shape.
Shape:getRestitutionGets the restitution of this shape. Removed in 0.8.0
Shape:getTypeGets a string representing the Shape.
Shape:isSensorChecks whether a Shape is a sensor or not. Removed in 0.8.0
Shape:rayCastCasts a ray against the shape.Added since 0.8.0
Shape:setCategorySets the categories this shape is a member of. Removed in 0.8.0
Shape:setDataSet data to be passed to the collision callback. Removed in 0.8.0
Shape:setDensitySets the density of a Shape. Removed in 0.8.0
Shape:setFilterDataSets the filter data for a Shape. Removed in 0.8.0
Shape:setFrictionSets the friction of the shape. Removed in 0.8.0
Shape:setMaskSets which categories this shape should NOT collide with. Removed in 0.8.0
Shape:setRestitutionSets the restitution of the shape. Removed in 0.8.0
Shape:setSensorSets whether this shape should act as a sensor. Removed in 0.8.0
Shape:testPointChecks whether a point lies inside the shape.
Shape:testSegmentChecks whether a line segment intersects a shape. Removed in 0.8.0

Supertypes

See Also


Other Languages

Personal tools