Shape:getMask

Shape:getMask Removed in LÖVE 0.8.0 Use Fixture:getMask instead. Gets which categories this shape should NOT collide with. The number of masked categories is the number of return values. Function Synopsis ... = Shape:getMask( ) Arguments None. Returns number ... Numbers from 1-16 Examples With how many categories does this shape collide? print('shape collides with', select('#', shape:getMask()), 'categories') See Also Shape Shape:setMask

Shape:getRadius

Shape:getRadius Gets the radius of the shape. Function Synopsis radius = Shape:getRadius() From the Box2D manual: Polygons inherit a radius from Shape. The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated. This allows continuous collision to work against the core polygon. Arguments None. Returns number radius The radius of the shape. See Also Shape

Shape:getRestitution

Shape:getRestitution Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Gets the restitution of this shape. Function Synopsis restitution = Shape:getRestitution( ) Arguments None. Returns number restitution The restitution of this Shape. See Also Shape

Shape:getType

Shape:getType Gets a string representing the Shape. This function can be useful for conditional debug drawing. Function Synopsis type = Shape:getType( ) Arguments None. Returns ShapeType type The type of the Shape. Examples Printing the type of a shape shape1 = love.physics.newCircleShape( my_body, 0, 0, 20 ) print(shape1:getType()) -- outputs: 'circle'   shape2 = love.physics.newPolygonShape( my_body, ... ) print(shape2:getType()) -- outputs: 'polygon'   shape3 = love.physics.newRectangle

Shape:isSensor

Shape:isSensor Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Checks whether a Shape is a sensor or not. Function Synopsis s = Shape:isSensor( ) Arguments None. Returns boolean s True if sensor, false otherwise. See Also Shape

Shape:rayCast

Shape:rayCast Available since LÖVE 0.8.0 This function is not supported in earlier versions. Casts a ray against the shape and returns the surface normal vector and the line position where the ray hit. If the ray missed the shape, nil will be returned. The Shape can be transformed to get it into the desired position. The ray starts on the first point of the input line and goes towards the second point of the line. The fourth argument is the maximum distance the ray is going to travel as a

Shape:setCategory

Shape:setCategory Removed in LÖVE 0.8.0 Use Fixture:setCategory instead. Sets the categories this shape is a member of. Sets the categories of this shape by specifying numbers from 1-16 as parameters. Categories can be used to prevent certain shapes from colliding. Function Synopsis Shape:setCategory( ... ) Arguments numbers ... Numbers from 1-16 Returns Nothing. See Also Shape

Shape:setData

Shape:setData Removed in LÖVE 0.8.0 Use Fixture:setUserData instead. Set data to be passed to the collision callback. When a shape collides, the value set here will be passed to the collision callback as one of the parameters. Typically, you would want to store a table reference here, but any value can be used. Function Synopsis Shape:setData( v ) Arguments any v Any Lua value. Returns Nothing. See Also Shape Shape:getData

Shape:setDensity

Shape:setDensity Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Sets the density of a Shape. Do this before calling Body:setMassFromShapes. Function Synopsis Shape:setDensity( density ) Arguments number density The new density of the Shape. Returns Nothing. See Also Shape

Shape:setFilterData

Shape:setFilterData Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Sets the filter data for a Shape. Info stolen from box2d.org: Collision filtering is a system for preventing collision between shapes. For example, say you make a character that rides a bicycle. You want the bicycle to collide with the terrain and the character to collide with the terrain, but you don't want the character to collide with the bicycle (because they must overlap). Box2D suppor