Difference between revisions of "Body"

m (1 revision: Importing from potato (again).)
m
Line 1: Line 1:
 
 
Bodies are objects with velocity and position.
 
Bodies are objects with velocity and position.
  
Line 18: Line 17:
 
{{#set:Description=Bodies are objects with velocity and position.
 
{{#set:Description=Bodies are objects with velocity and position.
 
}}
 
}}
 +
== Other Languages ==
 +
{{i18n|Body}}

Revision as of 16:00, 22 December 2010

Bodies are objects with velocity and position.

Create a new body with love.physics.newBody.


A body can call these functions:

Functions

Body:applyAngularImpulseApplies an angular impulse to a body.
Body:applyForceApply force to a Body.
Body:applyImpulseApplies an impulse to a body.
Body:applyLinearImpulseApplies an impulse to a body.
Body:applyTorqueApply torque to a body.
Body:destroyExplicitly destroys the Body.
Body:getAllowSleepingReturn whether a body is allowed to sleep.
Body:getAngleGet the angle of the body.
Body:getAngularDampingGets the Angular damping of the Body.
Body:getAngularVelocityGet the angular velocity of the Body.
Body:getContactListGets a list of all Contacts attached to the Body.
Body:getContactsGets a list of all Contacts attached to the Body.
Body:getFixtureListReturns a table with all fixtures.
Body:getFixturesReturns a table with all fixtures.
Body:getGravityScaleReturns the gravity scale factor.
Body:getInertiaGets the rotational inertia of the body.
Body:getJointListReturns a table containing the Joints attached to this Body.
Body:getJointsReturns a table containing the Joints attached to this 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.
Body:getPositionGet the position of the body.
Body:getTransformGet the position and angle of the body.
Body:getTypeReturns the type of the body.
Body:getUserDataReturns the Lua value associated with this Body.
Body:getWorldGets the World the body lives in.
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.
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.
Body:isAwakeReturns the sleep status of the body.
Body:isBulletGet the bullet status of a body.
Body:isDestroyedGets whether the Body is destroyed.
Body:isDynamicGet the dynamic status of the body.
Body:isFixedRotationReturns whether the body rotation is locked.
Body:isFrozenGet the frozen status of the body.
Body:isSleepingGet the sleeping status of a body.
Body:isSleepingAllowedReturns the sleeping behaviour of the body.
Body:isStaticGet the static status of the body.
Body:isTouchingGets whether the Body is touching the given other Body.
Body:putToSleepPut the body to sleep.
... further results

See Also

Other Languages