Physics.P2.Body#Body

new Body(game, sprite, x, y, mass) The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene.In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions i

Physics.P2.Body#applyImpulseLocal()

applyImpulseLocal(impulse, localX, localY) Apply impulse to a point local to the body. This could for example be a point on the Body surface. An impulse is a force added to a body during a shortperiod of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity. Parameters Name Type Description impulse Float32Array | Array The impulse vector to add, oriented in local space. localX number A local point on the body. localY number A local point on the

Physics.P2.Body#applyImpulse()

applyImpulse(impulse, worldX, worldY) Apply impulse to a point relative to the body.This could for example be a point on the Body surface. An impulse is a force added to a body during a shortperiod of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity. Parameters Name Type Description impulse Float32Array | Array The impulse vector to add, oriented in world space. worldX number A point relative to the body in world space. If not given, it is s

Physics.P2.Body#applyForce()

applyForce(force, worldX, worldY) Apply force to a world point. This could for example be a point on the RigidBody surface. Applying forcethis way will add to Body.force and Body.angularForce. Parameters Name Type Description force Float32Array | Array The force vector to add. worldX number The world x point to apply the force on. worldY number The world y point to apply the force on. Source code: physics/p2/Body.js (Line 561)

Physics.P2.Body#applyDamping()

applyDamping(dt) Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details. Parameters Name Type Description dt number Current time step. Source code: physics/p2/Body.js (Line 516)

Physics.P2.Body#angularVelocity

angularVelocity : number The angular velocity of the body. Source code: physics/p2/Body.js (Line 1691)

Physics.P2.Body#angularForce

angularForce : number The angular force acting on the body. Source code: physics/p2/Body.js (Line 1671)

Physics.P2.Body#angularDamping

angularDamping : number Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The angular damping acting acting on the body. Source code: physics/p2/Body.js (Line 1650)

Physics.P2.Body#angle

angle : number The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90.If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't hav

Physics.P2.Body#allowSleep

allowSleep : boolean - Source code: physics/p2/Body.js (Line 1603)