B2.Body

From GiderosMobile
Revision as of 10:04, 23 August 2018 by Hgy29 (talk | contribs)

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


A rigid body. These are created via `b2.World:createBody`.

Methods

b2.Body:applyAngularImpulse - applies an angular impulse
b2.Body:applyForce - applies a force at a world point
b2.Body:applyLinearImpulse - applies an impulse at a point
b2.Body:applyTorque - applies a torque
b2.Body:createFixture - creates a fixture and attach it to this body
b2.Body:destroyFixture - destroys a fixture
b2.Body:getAngle - returns the current world rotation angle in radians
b2.Body:getAngularDamping - returns the angular damping of the body
b2.Body:getAngularVelocity - returns the angular velocity
b2.Body:getGravityScale - returns the gravity scale of the body
b2.Body:getInertia - returns the rotational inertia of the body about the local origin in kg-m^2
b2.Body:getLinearDamping - returns the linear damping of the body
b2.Body:getLinearVelocity - returns the linear velocity of the center of mass
b2.Body:getLocalCenter - returns the local position of the center of mass
b2.Body:getLocalPoint -
b2.Body:getLocalVector -
b2.Body:getMass - returns the total mass of the body in kilograms (kg)
b2.Body:getPosition - returns the world body origin position
b2.Body:getWorldCenter - returns the world position of the center of mass
b2.Body:getWorldPoint -
b2.Body:getWorldVector -
b2.Body:isActive - returns the active state of the body
b2.Body:isAwake - returns the sleeping state of the body
b2.Body:isBullet -
b2.Body:isFixedRotation -
b2.Body:isSleepingAllowed -
b2.Body:setActive - sets the active state of the body
b2.Body:setAngle -
b2.Body:setAngularDamping - sets the angular damping of the body
b2.Body:setAngularVelocity - sets the angular velocity
b2.Body:setAwake - sets the sleep state of the body
b2.Body:setBullet -
b2.Body:setFixedRotation -
b2.Body:setGravityScale - sets the gravity scale of the body
b2.Body:setLinearDamping - sets the linear damping of the body
b2.Body:setLinearVelocity - sets the linear velocity of the center of mass
b2.Body:setPosition - sets the world body origin position
b2.Body:setSleepingAllowed -

Events

Constants