Difference between revisions of "B2.Body"
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> A rigid body. These are created via `b2.World:createBody`.<br...") |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' <br/> | + | '''Supported platforms:''' android, ios, mac, pc<br/> |
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === Description === | ||
Line 6: | Line 6: | ||
A rigid body. These are created via `b2.World:createBody`.<br /> | A rigid body. These are created via `b2.World:createBody`.<br /> | ||
<br /> | <br /> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
{|- | {|- | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
+ | [[b2.Body:applyAngularImpulse]] - applies an angular impulse<br/> | ||
+ | [[b2.Body:applyForce]] - applies a force at a world point<br/> | ||
+ | [[b2.Body:applyLinearImpulse]] - applies an impulse at a point<br/> | ||
+ | [[b2.Body:applyTorque]] - applies a torque<br/> | ||
+ | [[b2.Body:createFixture]] - creates a fixture and attach it to this body<br/> | ||
+ | [[b2.Body:destroyFixture]] - destroys a fixture<br/> | ||
+ | [[b2.Body:getAngle]] - returns the current world rotation angle in radians<br/> | ||
+ | [[b2.Body:getAngularDamping]] - returns the angular damping of the body<br/> | ||
+ | [[b2.Body:getAngularVelocity]] - returns the angular velocity<br/> | ||
+ | [[b2.Body:getGravityScale]] - returns the gravity scale of the body<br/> | ||
+ | [[b2.Body:getInertia]] - returns the rotational inertia of the body about the local origin in kg-m^2<br/> | ||
+ | [[b2.Body:getLinearDamping]] - returns the linear damping of the body<br/> | ||
+ | [[b2.Body:getLinearVelocity]] - returns the linear velocity of the center of mass<br/> | ||
+ | [[b2.Body:getLocalCenter]] - returns the local position of the center of mass<br/> | ||
+ | [[b2.Body:getLocalPoint]] - <br/> | ||
+ | [[b2.Body:getLocalVector]] - <br/> | ||
+ | [[b2.Body:getMass]] - returns the total mass of the body in kilograms (kg)<br/> | ||
+ | [[b2.Body:getPosition]] - returns the world body origin position<br/> | ||
+ | [[b2.Body:getWorldCenter]] - returns the world position of the center of mass<br/> | ||
+ | [[b2.Body:getWorldPoint]] - <br/> | ||
+ | [[b2.Body:getWorldVector]] - <br/> | ||
+ | [[b2.Body:isActive]] - returns the active state of the body<br/> | ||
+ | [[b2.Body:isAwake]] - returns the sleeping state of the body<br/> | ||
+ | [[b2.Body:isBullet]] - <br/> | ||
+ | [[b2.Body:isFixedRotation]] - <br/> | ||
+ | [[b2.Body:isSleepingAllowed]] - <br/> | ||
+ | [[b2.Body:setActive]] - sets the active state of the body<br/> | ||
+ | [[b2.Body:setAngle]] - <br/> | ||
+ | [[b2.Body:setAngularDamping]] - sets the angular damping of the body<br/> | ||
+ | [[b2.Body:setAngularVelocity]] - sets the angular velocity<br/> | ||
+ | [[b2.Body:setAwake]] - sets the sleep state of the body<br/> | ||
+ | [[b2.Body:setBullet]] - <br/> | ||
+ | [[b2.Body:setFixedRotation]] - <br/> | ||
+ | [[b2.Body:setGravityScale]] - sets the gravity scale of the body<br/> | ||
+ | [[b2.Body:setLinearDamping]] - sets the linear damping of the body<br/> | ||
+ | [[b2.Body:setLinearVelocity]] - sets the linear velocity of the center of mass<br/> | ||
+ | [[b2.Body:setPosition]] - sets the world body origin position<br/> | ||
+ | [[b2.Body:setSleepingAllowed]] - <br/> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
|} | |} |
Revision as of 08:58, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
Description
A rigid body. These are created via `b2.World:createBody`.
Methodsb2.Body:applyAngularImpulse - applies an angular impulse |
EventsConstants |