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: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: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: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:getFriction

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

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:getFilterData

Shape:getFilterData Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Gets the filter data of the Shape. Function Synopsis categoryBits, maskBits, groupIndex = Shape:getFilterData( ) Arguments None. Returns number categoryBits A 16-bit integer representing category membership. number maskBits A 16-bit integer representing masked categories. number groupIndex An integer representing the group index. See Also Shape

Shape:getDensity

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

Shape:getChildCount

Shape:getChildCount Available since LÖVE 0.8.0 This function is not supported in earlier versions. Returns the number of children the shape has. Function Synopsis count = Shape:getChildCount( ) Arguments None. Returns number count The number of children. See Also Shape

Shape:getData

Shape:getData Removed in LÖVE 0.8.0 Use Fixture:getUserData instead. Get the data set with setData. Function Synopsis v = Shape:getData( ) Arguments None. Returns any v The data previously set, or nil if none. See Also Shape Shape:setData