Inheritance #

Table of contents

PhysicsDirectBodyState2DExtension #

is_instantiable, core, not_builtin_classes

Provides virtual methods that can be overridden to create custom PhysicsDirectBodyState2D implementations.

This class extends PhysicsDirectBodyState2D by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.

Intended for use with GDExtension to create custom implementations of PhysicsDirectBodyState2D.

Members #

Methods #

virtual func _add_constant_central_force(force: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.add_constant_central_force.

virtual func _add_constant_force(position: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.add_constant_force.

virtual func _add_constant_torque(torque: float) -> void#

Overridable version of PhysicsDirectBodyState2D.add_constant_torque.

virtual func _apply_central_force(force: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_central_force.

virtual func _apply_central_impulse(impulse: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_central_impulse.

virtual func _apply_force(position: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_force.

virtual func _apply_impulse(position: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_impulse.

virtual func _apply_torque(torque: float) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_torque.

virtual func _apply_torque_impulse(impulse: float) -> void#

Overridable version of PhysicsDirectBodyState2D.apply_torque_impulse.

virtual const func _get_angular_velocity() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.angular_velocity and its respective getter.

virtual const func _get_center_of_mass() -> Vector2#

Implement to override the behavior of PhysicsDirectBodyState2D.center_of_mass and its respective getter.

virtual const func _get_center_of_mass_local() -> Vector2#

Implement to override the behavior of PhysicsDirectBodyState2D.center_of_mass_local and its respective getter.

virtual const func _get_constant_force() -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_constant_force.

virtual const func _get_constant_torque() -> float#

Overridable version of PhysicsDirectBodyState2D.get_constant_torque.

virtual const func _get_contact_collider(contact_idx: int) -> RID#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider.

virtual const func _get_contact_collider_id(contact_idx: int) -> int#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_id.

virtual const func _get_contact_collider_object(contact_idx: int) -> Object#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_object.

virtual const func _get_contact_collider_position(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_position.

virtual const func _get_contact_collider_shape(contact_idx: int) -> int#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_shape.

virtual const func _get_contact_collider_velocity_at_position(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position.

virtual const func _get_contact_count() -> int#

Overridable version of PhysicsDirectBodyState2D.get_contact_count.

virtual const func _get_contact_impulse(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_impulse.

virtual const func _get_contact_local_normal(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_local_normal.

virtual const func _get_contact_local_position(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_local_position.

virtual const func _get_contact_local_shape(contact_idx: int) -> int#

Overridable version of PhysicsDirectBodyState2D.get_contact_local_shape.

virtual const func _get_contact_local_velocity_at_position(contact_idx: int) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_contact_local_velocity_at_position.

virtual const func _get_inverse_inertia() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.inverse_inertia and its respective getter.

virtual const func _get_inverse_mass() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.inverse_mass and its respective getter.

virtual const func _get_linear_velocity() -> Vector2#

Implement to override the behavior of PhysicsDirectBodyState2D.linear_velocity and its respective getter.

virtual func _get_space_state() -> PhysicsDirectSpaceState2D#

Overridable version of PhysicsDirectBodyState2D.get_space_state.

virtual const func _get_step() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.step and its respective getter.

virtual const func _get_total_angular_damp() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.total_angular_damp and its respective getter.

virtual const func _get_total_gravity() -> Vector2#

Implement to override the behavior of PhysicsDirectBodyState2D.total_gravity and its respective getter.

virtual const func _get_total_linear_damp() -> float#

Implement to override the behavior of PhysicsDirectBodyState2D.total_linear_damp and its respective getter.

virtual const func _get_transform() -> Transform2D#

Implement to override the behavior of PhysicsDirectBodyState2D.transform and its respective getter.

virtual const func _get_velocity_at_local_position(local_position: Vector2) -> Vector2#

Overridable version of PhysicsDirectBodyState2D.get_velocity_at_local_position.

virtual func _integrate_forces() -> void#

Overridable version of PhysicsDirectBodyState2D.integrate_forces.

virtual const func _is_sleeping() -> bool#

Implement to override the behavior of PhysicsDirectBodyState2D.sleeping and its respective getter.

virtual func _set_angular_velocity(velocity: float) -> void#

Implement to override the behavior of PhysicsDirectBodyState2D.angular_velocity and its respective setter.

virtual func _set_constant_force(force: Vector2) -> void#

Overridable version of PhysicsDirectBodyState2D.set_constant_force.

virtual func _set_constant_torque(torque: float) -> void#

Overridable version of PhysicsDirectBodyState2D.set_constant_torque.

virtual func _set_linear_velocity(velocity: Vector2) -> void#

Implement to override the behavior of PhysicsDirectBodyState2D.linear_velocity and its respective setter.

virtual func _set_sleep_state(enabled: bool) -> void#

Implement to override the behavior of PhysicsDirectBodyState2D.sleeping and its respective setter.

virtual func _set_transform(transform: Transform2D) -> void#

Implement to override the behavior of PhysicsDirectBodyState2D.transform and its respective setter.

Annotations #

Constants #

Constructors #

Enums #

Operators #

Signals #

Theme Items #

Tutorials #