Body

Bodies are objects with velocity and position.

Constructors

love.physics.newBodyCreates a new body.

Functions

Body:applyAngularImpulseApplies an angular impulse to a body.Added since 0.8.0
Body:applyForceApply force to a Body.
Body:applyImpulseApplies an impulse to a body. Removed in 0.8.0
Body:applyLinearImpulseApplies an impulse to a body.Added since 0.8.0
Body:applyTorqueApply torque to a body.
Body:destroyExplicitly destroys the Body.
Body:getAllowSleepingReturn whether a body is allowed to sleep.Added since 0.7.0 Removed in 0.8.0
Body:getAngleGet the angle of the body.
Body:getAngularDampingGets the Angular damping of the Body.
Body:getAngularVelocityGet the angular velocity of the Body.
Body:getFixtureListReturns a table with all fixtures.Added since 0.8.0
Body:getGravityScaleReturns the gravity scale factor.Added since 0.8.0
Body:getInertiaGets the rotational inertia of the body.
Body:getLinearDampingGets the linear damping of the Body.
Body:getLinearVelocityGets the linear velocity of the Body from its center of mass.
Body:getLinearVelocityFromLocalPointGet the linear velocity of a point on the body.
Body:getLinearVelocityFromWorldPointGet the linear velocity of a point on the body.
Body:getLocalCenterGet the center of mass position in local coordinates.
Body:getLocalPointTransform a point from world coordinates to local coordinates.
Body:getLocalVectorTransform a vector from world coordinates to local coordinates.
Body:getMassGet the mass of the body.
Body:getMassDataReturns the mass, its center, and the rotational inertia.Added since 0.8.0
Body:getPositionGet the position of the body.
Body:getTypeReturns the type of the body.Added since 0.8.0
Body:getUserDataReturns the Lua value associated with this Body.Added since 0.9.1
Body:getWorldCenterGet the center of mass position in world coordinates.
Body:getWorldPointTransform a point from local coordinates to world coordinates.
Body:getWorldPointsTransforms multiple points from local coordinates to world coordinates.Added since 0.8.0
Body:getWorldVectorTransform a vector from local coordinates to world coordinates.
Body:getXGet the x position of the body in world coordinates.
Body:getYGet the y position of the body in world coordinates.
Body:isActiveReturns whether the body is actively used in the simulation.Added since 0.8.0
Body:isAwakeReturns the sleep status of the body.Added since 0.8.0
Body:isBulletGet the bullet status of a body.
Body:isDynamicGet the dynamic status of the body. Removed in 0.8.0
Body:isFixedRotationReturns whether the body rotation is locked.Added since 0.8.0
Body:isFrozenGet the frozen status of the body. Removed in 0.8.0
Body:isSleepingGet the sleeping status of a body. Removed in 0.8.0
Body:isSleepingAllowedReturns the sleeping behaviour of the body.Added since 0.8.0
Body:isStaticGet the static status of the body. Removed in 0.8.0
Body:putToSleepPut the body to sleep. Removed in 0.8.0
Body:resetMassDataResets the mass of the body.Added since 0.8.0
Body:setActiveSets whether the body is active in the world.Added since 0.8.0
Body:setAllowSleepingSet the sleep behaviour of a body. Removed in 0.8.0
Body:setAngleSet the angle of the body.
Body:setAngularDampingSets the angular damping of a Body
Body:setAngularVelocitySets the angular velocity of a Body.
Body:setAwakeWakes the body up or puts it to sleep.Added since 0.8.0
Body:setBulletSet the bullet status of a body.
Body:setFixedRotationSet whether a body has fixed rotation.
Body:setGravityScaleSets a new gravity scale factor for the body.Added since 0.8.0
Body:setInertiaSet the inertia of a body.
Body:setLinearDampingSets the linear damping of a Body.
Body:setLinearVelocitySets a new linear velocity for the Body.
Body:setMassSets the mass properties directly.
Body:setMassDataOverrides the calculated mass data.Added since 0.8.0
Body:setMassFromShapesSets mass properties from attatched shapes. Removed in 0.8.0
Body:setPositionSet the position of the body.
Body:setSleepingAllowedSets the sleeping behaviour of the body.Added since 0.8.0
Body:setTypeSets a new body type.Added since 0.8.0
Body:setUserDataAssociates a Lua value with the Body.Added since 0.9.1
Body:setXSet the x position of the body.
Body:setYSet the y position of the body.
Body:wakeUpWake up a sleeping body. Removed in 0.8.0
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Enums

BodyTypeThe types of a Body.

Supertypes

See Also


Other Languages

Personal tools