ActivateEntity

From OxeyeWiki

Revision as of 11:54, 7 February 2010 by Jeb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

physics:activateEntity(entityId)

Calculates and sets the mass for an entity. Entities that have mass are treated as "active" objects by Box2d, and will be updated during the physics' update phase. Note that if the entity's shapes doesn't have any density, the entity will not get any mass value and wont be activated. You can make an entity static again by calling deactivateEntity (note that this means it sets the entity's body mass to 0 again).

Parameter Expected Type Description
entityId An integer The body id number of the entity that should be activated.
Returns

Returns nothing.

Daisymoon Physics Lib


Example


   physics:activateEntity(player.body)

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox