Index · Object → PhysicsDirectBodyState2D → PhysicsDirectBodyState2DExtension

PhysicsDirectBodyState2DExtension

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

Class Description

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.

Properties

Inherited from PhysicsDirectBodyState2D (14)
var step: float

Methods

func _add_constant_central_force(force: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.add_constant_central_force().

func _add_constant_force(force: Vector2, position: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.add_constant_force().

func _add_constant_torque(torque: float) -> void

Overridable version of PhysicsDirectBodyState2D.add_constant_torque().

func _apply_central_force(force: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.apply_central_force().

func _apply_central_impulse(impulse: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.apply_central_impulse().

func _apply_force(force: Vector2, position: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.apply_force().

func _apply_impulse(impulse: Vector2, position: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.apply_impulse().

func _apply_torque(torque: float) -> void

Overridable version of PhysicsDirectBodyState2D.apply_torque().

func _apply_torque_impulse(impulse: float) -> void

Overridable version of PhysicsDirectBodyState2D.apply_torque_impulse().

func _get_angular_velocity() -> float

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

func _get_center_of_mass() -> Vector2

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

func _get_center_of_mass_local() -> Vector2

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

func _get_collision_layer() -> int
func _get_collision_mask() -> int
func _get_constant_force() -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_constant_force().

func _get_constant_torque() -> float

Overridable version of PhysicsDirectBodyState2D.get_constant_torque().

func _get_contact_collider(contact_idx: int) -> RID

Overridable version of PhysicsDirectBodyState2D.get_contact_collider().

func _get_contact_collider_id(contact_idx: int) -> int

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_id().

func _get_contact_collider_object(contact_idx: int) -> Object

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_object().

func _get_contact_collider_position(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_position().

func _get_contact_collider_shape(contact_idx: int) -> int

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_shape().

func _get_contact_collider_velocity_at_position(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position().

func _get_contact_count() -> int

Overridable version of PhysicsDirectBodyState2D.get_contact_count().

func _get_contact_impulse(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_impulse().

func _get_contact_local_normal(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_local_normal().

func _get_contact_local_position(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_local_position().

func _get_contact_local_shape(contact_idx: int) -> int

Overridable version of PhysicsDirectBodyState2D.get_contact_local_shape().

func _get_contact_local_velocity_at_position(contact_idx: int) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_contact_local_velocity_at_position().

func _get_inverse_inertia() -> float

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

func _get_inverse_mass() -> float

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

func _get_linear_velocity() -> Vector2

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

func _get_space_state() -> PhysicsDirectSpaceState2D

Overridable version of PhysicsDirectBodyState2D.get_space_state().

func _get_step() -> float

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

func _get_total_angular_damp() -> float

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

func _get_total_gravity() -> Vector2

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

func _get_total_linear_damp() -> float

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

func _get_transform() -> Transform2D

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

func _get_velocity_at_local_position(local_position: Vector2) -> Vector2

Overridable version of PhysicsDirectBodyState2D.get_velocity_at_local_position().

func _integrate_forces() -> void

Overridable version of PhysicsDirectBodyState2D.integrate_forces().

func _is_sleeping() -> bool

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

func _set_angular_velocity(velocity: float) -> void

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

func _set_collision_layer(layer: int) -> void
func _set_collision_mask(mask: int) -> void
func _set_constant_force(force: Vector2) -> void

Overridable version of PhysicsDirectBodyState2D.set_constant_force().

func _set_constant_torque(torque: float) -> void

Overridable version of PhysicsDirectBodyState2D.set_constant_torque().

func _set_linear_velocity(velocity: Vector2) -> void

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

func _set_sleep_state(enabled: bool) -> void

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

func _set_transform(transform: Transform2D) -> void

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

Inherited from PhysicsDirectBodyState2D (28)
func add_constant_central_force(force: Vector2 = Vector2(0, 0)) -> void
func add_constant_force(force: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func add_constant_torque(torque: float) -> void
func apply_central_force(force: Vector2 = Vector2(0, 0)) -> void
func apply_central_impulse(impulse: Vector2) -> void
func apply_force(force: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func apply_impulse(impulse: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func apply_torque(torque: float) -> void
func apply_torque_impulse(impulse: float) -> void
func get_contact_collider(contact_idx: int) -> RID
func get_contact_collider_id(contact_idx: int) -> int
func get_contact_collider_object(contact_idx: int) -> Object
func get_contact_collider_shape(contact_idx: int) -> int
func get_contact_impulse(contact_idx: int) -> Vector2
func get_contact_local_normal(contact_idx: int) -> Vector2
func get_contact_local_position(contact_idx: int) -> Vector2
func get_contact_local_shape(contact_idx: int) -> int
func integrate_forces() -> void
func set_constant_force(force: Vector2) -> void
func set_constant_torque(torque: float) -> void
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)