Skip to content

class_physics2ddirectbodystate

reduz edited this page Feb 23, 2014 · 11 revisions

Physics2DDirectBodyState

Inherits: Object\n\n

Brief Description

Direct access object to a physics body in the physics2dserver.

Member Functions

Description

Direct access object to a physics body in the physics2dserver. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body.

Member Function Description

  • real ** get_total_density ** ( ) const \ Return the space density currently being applied to this body.
  • void ** set_sleep_state ** ( bool enabled ) \ Set the sleeping state of the body, only affects character/rigid bodies.
  • bool ** is_sleeping ** ( ) const \ Return true if this body is currently sleeping (not active).
  • int ** get_contact_count ** ( ) const \ Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts.
  • Object ** get_contact_collider_object ** ( int contact_idx ) const \ Return the collider object, this depends on how it was created (will return a scene node if such was used to create it).
  • real ** get_step ** ( ) const \ Return the timestep (delta) used for the simulation.

Clone this wiki locally