Fixture:setFriction

Fixture:setFriction Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets the friction of the fixture. Friction determines how shapes react when they "slide" along other shapes. Low friction indicates a slippery surface, like ice, while high friction indicates a rough surface, like concrete. Range: 0.0 - 1.0. Function Synopsis Fixture:setFriction( friction ) Arguments number friction The fixture friction. Returns Nothing. See Also Fixture Fixture:getFric

Fixture:setDensity

Fixture:setDensity Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets the density of the fixture. Call Body:resetMassData if this needs to take effect immediately. Function Synopsis Fixture:setDensity( density ) Arguments number density The fixture density in kilograms per square meter. Returns Nothing. See Also Fixture Fixture:getDensity

Fixture:setCategory

Fixture:setCategory Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets the categories the fixture belongs to. There can be up to 16 categories represented as a number from 1 to 16. Function Synopsis Fixture:setCategory( category1, category2, ... ) Arguments number category1 The first category. number category2 The second category. Returns Nothing. See Also Fixture Fixture:getCategory

Fixture:rayCast

Fixture:rayCast Available since LÖVE 0.8.0 This method is not supported in earlier versions. Casts a ray against the shape of the fixture 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 ray starts on the first point of the input line and goes towards the second point of the line. The fifth argument is the maximum distance the ray is going to travel as a scale factor of the input line length. The childInd

Fixture:isSensor

Fixture:isSensor Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns whether the fixture is a sensor. Function Synopsis sensor = Fixture:isSensor( ) Arguments None. Returns boolean sensor If the fixture is a sensor. See Also Fixture Fixture:setSensor

Fixture:isDestroyed

Fixture:isDestroyed Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets whether the Fixture is destroyed. Destroyed fixtures cannot be used. Function Synopsis destroyed = Fixture:isDestroyed( ) Arguments None. Returns boolean destroyed Whether the Fixture is destroyed. See Also Fixture Fixture:destroy

Fixture:getUserData

Fixture:getUserData Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the Lua value associated with this fixture. Use this function in one thread and one thread only. Using it in more threads will make Lua cry and most likely crash. Function Synopsis value = Fixture:getUserData( ) Arguments None. Returns any value The Lua value associated with the fixture. See Also Fixture Fixture:setUserData

Fixture:getRestitution

Fixture:getRestitution Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the restitution of the fixture. Function Synopsis restitution = Fixture:getRestitution( ) Arguments None. Returns number restitution The fixture restitution. See Also Fixture Fixture:setRestitution

Fixture:getShape

Fixture:getShape Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the shape of the fixture. This shape is a reference to the actual data used in the simulation. It's possible to change its values between timesteps. Do not call any functions on this shape after the parent fixture has been destroyed. This shape will point to an invalid memory address and likely cause crashes if you interact further with it. Function Synopsis shape = Fixture:getShape( ) Ar

Fixture:getMassData

Fixture:getMassData Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the mass, its center and the rotational inertia. Function Synopsis x, y, mass, inertia = Fixture:getMassData( ) Arguments None. Returns number x The x position of the center of mass. number y The y position of the center of mass. number mass The mass of the fixture. number inertia The rotational inertia. See Also Fixture