RigidBody2D

Inherits: PhysicsBody2D < CollisionObject2D < Node2D < CanvasItem < Node < Object

Inherited By: PhysicalBone2D

There is currently no description for this class. Please help us by contributing one!

Properties

float

angular_damp

0.0

DampMode

angular_damp_mode

0

float

angular_velocity

0.0

bool

can_sleep

true

Vector2

center_of_mass

Vector2(0, 0)

CenterOfMassMode

center_of_mass_mode

0

Vector2

constant_force

Vector2(0, 0)

float

constant_torque

0.0

bool

contact_monitor

false

CCDMode

continuous_cd

0

bool

custom_integrator

false

bool

freeze

false

FreezeMode

freeze_mode

0

float

gravity_scale

1.0

float

inertia

0.0

float

linear_damp

0.0

DampMode

linear_damp_mode

0

Vector2

linear_velocity

Vector2(0, 0)

bool

lock_rotation

false

float

mass

1.0

int

max_contacts_reported

0

PhysicsMaterial

physics_material_override

bool

sleeping

false

Methods

void

_integrate_forces ( PhysicsDirectBodyState2D state ) virtual

void

add_constant_central_force ( Vector2 force )

void

add_constant_force ( Vector2 force, Vector2 position=Vector2(0, 0) )

void

add_constant_torque ( float torque )

void

apply_central_force ( Vector2 force )

void

apply_central_impulse ( Vector2 impulse=Vector2(0, 0) )

void

apply_force ( Vector2 force, Vector2 position=Vector2(0, 0) )

void

apply_impulse ( Vector2 impulse, Vector2 position=Vector2(0, 0) )

void

apply_torque ( float torque )

void

apply_torque_impulse ( float torque )

Node2D[]

get_colliding_bodies ( ) const

int

get_contact_count ( ) const

void

set_axis_velocity ( Vector2 axis_velocity )


Signals

body_entered ( Node body )

There is currently no description for this signal. Please help us by contributing one!


body_exited ( Node body )

There is currently no description for this signal. Please help us by contributing one!


body_shape_entered ( RID body_rid, Node body, int body_shape_index, int local_shape_index )

There is currently no description for this signal. Please help us by contributing one!


body_shape_exited ( RID body_rid, Node body, int body_shape_index, int local_shape_index )

There is currently no description for this signal. Please help us by contributing one!


sleeping_state_changed ( )

There is currently no description for this signal. Please help us by contributing one!


Enumerations

enum FreezeMode:

FreezeMode FREEZE_MODE_STATIC = 0

There is currently no description for this enum. Please help us by contributing one!

FreezeMode FREEZE_MODE_KINEMATIC = 1

There is currently no description for this enum. Please help us by contributing one!


enum CenterOfMassMode:

CenterOfMassMode CENTER_OF_MASS_MODE_AUTO = 0

There is currently no description for this enum. Please help us by contributing one!

CenterOfMassMode CENTER_OF_MASS_MODE_CUSTOM = 1

There is currently no description for this enum. Please help us by contributing one!


enum DampMode:

DampMode DAMP_MODE_COMBINE = 0

There is currently no description for this enum. Please help us by contributing one!

DampMode DAMP_MODE_REPLACE = 1

There is currently no description for this enum. Please help us by contributing one!


enum CCDMode:

CCDMode CCD_MODE_DISABLED = 0

There is currently no description for this enum. Please help us by contributing one!

CCDMode CCD_MODE_CAST_RAY = 1

There is currently no description for this enum. Please help us by contributing one!

CCDMode CCD_MODE_CAST_SHAPE = 2

There is currently no description for this enum. Please help us by contributing one!


Property Descriptions

float angular_damp = 0.0

  • void set_angular_damp ( float value )

  • float get_angular_damp ( )

There is currently no description for this property. Please help us by contributing one!


DampMode angular_damp_mode = 0

  • void set_angular_damp_mode ( DampMode value )

  • DampMode get_angular_damp_mode ( )

There is currently no description for this property. Please help us by contributing one!


float angular_velocity = 0.0

  • void set_angular_velocity ( float value )

  • float get_angular_velocity ( )

There is currently no description for this property. Please help us by contributing one!


bool can_sleep = true

  • void set_can_sleep ( bool value )

  • bool is_able_to_sleep ( )

There is currently no description for this property. Please help us by contributing one!


Vector2 center_of_mass = Vector2(0, 0)

  • void set_center_of_mass ( Vector2 value )

  • Vector2 get_center_of_mass ( )

There is currently no description for this property. Please help us by contributing one!


CenterOfMassMode center_of_mass_mode = 0

There is currently no description for this property. Please help us by contributing one!


Vector2 constant_force = Vector2(0, 0)

  • void set_constant_force ( Vector2 value )

  • Vector2 get_constant_force ( )

There is currently no description for this property. Please help us by contributing one!


float constant_torque = 0.0

  • void set_constant_torque ( float value )

  • float get_constant_torque ( )

There is currently no description for this property. Please help us by contributing one!


bool contact_monitor = false

  • void set_contact_monitor ( bool value )

  • bool is_contact_monitor_enabled ( )

There is currently no description for this property. Please help us by contributing one!


CCDMode continuous_cd = 0

  • void set_continuous_collision_detection_mode ( CCDMode value )

  • CCDMode get_continuous_collision_detection_mode ( )

There is currently no description for this property. Please help us by contributing one!


bool custom_integrator = false

  • void set_use_custom_integrator ( bool value )

  • bool is_using_custom_integrator ( )

There is currently no description for this property. Please help us by contributing one!


bool freeze = false

  • void set_freeze_enabled ( bool value )

  • bool is_freeze_enabled ( )

There is currently no description for this property. Please help us by contributing one!


FreezeMode freeze_mode = 0

There is currently no description for this property. Please help us by contributing one!


float gravity_scale = 1.0

  • void set_gravity_scale ( float value )

  • float get_gravity_scale ( )

There is currently no description for this property. Please help us by contributing one!


float inertia = 0.0

  • void set_inertia ( float value )

  • float get_inertia ( )

There is currently no description for this property. Please help us by contributing one!


float linear_damp = 0.0

  • void set_linear_damp ( float value )

  • float get_linear_damp ( )

There is currently no description for this property. Please help us by contributing one!


DampMode linear_damp_mode = 0

  • void set_linear_damp_mode ( DampMode value )

  • DampMode get_linear_damp_mode ( )

There is currently no description for this property. Please help us by contributing one!


Vector2 linear_velocity = Vector2(0, 0)

  • void set_linear_velocity ( Vector2 value )

  • Vector2 get_linear_velocity ( )

There is currently no description for this property. Please help us by contributing one!


bool lock_rotation = false

  • void set_lock_rotation_enabled ( bool value )

  • bool is_lock_rotation_enabled ( )

There is currently no description for this property. Please help us by contributing one!


float mass = 1.0

  • void set_mass ( float value )

  • float get_mass ( )

There is currently no description for this property. Please help us by contributing one!


int max_contacts_reported = 0

  • void set_max_contacts_reported ( int value )

  • int get_max_contacts_reported ( )

There is currently no description for this property. Please help us by contributing one!


PhysicsMaterial physics_material_override

There is currently no description for this property. Please help us by contributing one!


bool sleeping = false

  • void set_sleeping ( bool value )

  • bool is_sleeping ( )

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void _integrate_forces ( PhysicsDirectBodyState2D state ) virtual

There is currently no description for this method. Please help us by contributing one!


void add_constant_central_force ( Vector2 force )

There is currently no description for this method. Please help us by contributing one!


void add_constant_force ( Vector2 force, Vector2 position=Vector2(0, 0) )

There is currently no description for this method. Please help us by contributing one!


void add_constant_torque ( float torque )

There is currently no description for this method. Please help us by contributing one!


void apply_central_force ( Vector2 force )

There is currently no description for this method. Please help us by contributing one!


void apply_central_impulse ( Vector2 impulse=Vector2(0, 0) )

There is currently no description for this method. Please help us by contributing one!


void apply_force ( Vector2 force, Vector2 position=Vector2(0, 0) )

There is currently no description for this method. Please help us by contributing one!


void apply_impulse ( Vector2 impulse, Vector2 position=Vector2(0, 0) )

There is currently no description for this method. Please help us by contributing one!


void apply_torque ( float torque )

There is currently no description for this method. Please help us by contributing one!


void apply_torque_impulse ( float torque )

There is currently no description for this method. Please help us by contributing one!


Node2D[] get_colliding_bodies ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_contact_count ( ) const

There is currently no description for this method. Please help us by contributing one!


void set_axis_velocity ( Vector2 axis_velocity )

There is currently no description for this method. Please help us by contributing one!