// AUTO-GENERATED /// declare module "godot" { namespace RigidBody2D { enum FreezeMode { /** Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. */ FREEZE_MODE_STATIC = 0, /** Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. */ FREEZE_MODE_KINEMATIC = 1, } enum CenterOfMassMode { /** In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. */ CENTER_OF_MASS_MODE_AUTO = 0, /** In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. */ CENTER_OF_MASS_MODE_CUSTOM = 1, } enum DampMode { /** In this mode, the body's damping value is added to any value set in areas or the default value. */ DAMP_MODE_COMBINE = 0, /** In this mode, the body's damping value replaces any value set in areas or the default value. */ DAMP_MODE_REPLACE = 1, } enum CCDMode { /** Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. */ CCD_MODE_DISABLED = 0, /** Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. */ CCD_MODE_CAST_RAY = 1, /** Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. */ CCD_MODE_CAST_SHAPE = 2, } } /** A 2D physics body that is moved by a physics simulation. * * @link https://docs.godotengine.org/en/4.4/classes/class_rigidbody2d.html */ class RigidBody2D = Record> extends PhysicsBody2D { constructor(identifier?: any) /** Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body. */ /* gdvirtual */ _integrate_forces(state: PhysicsDirectBodyState2D): void /** Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). * * **Note:** To retrieve the colliding bodies, use [method get_colliding_bodies]. */ get_contact_count(): int64 /** Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. */ set_axis_velocity(axis_velocity: Vector2): void /** Applies a directional impulse without affecting rotation. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * This is equivalent to using [method apply_impulse] at the body's center of mass. */ apply_central_impulse(impulse: Vector2 = Vector2.ZERO): void /** Applies a positioned impulse to the body. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * [param position] is the offset from the body origin in global coordinates. */ apply_impulse(impulse: Vector2, position: Vector2 = Vector2.ZERO): void /** Applies a rotational impulse to the body without affecting the position. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia]. */ apply_torque_impulse(torque: float64): void /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. * This is equivalent to using [method apply_force] at the body's center of mass. */ apply_central_force(force: Vector2): void /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. * [param position] is the offset from the body origin in global coordinates. */ apply_force(force: Vector2, position: Vector2 = Vector2.ZERO): void /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. * * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia]. */ apply_torque(torque: float64): void /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. * This is equivalent to using [method add_constant_force] at the body's center of mass. */ add_constant_central_force(force: Vector2): void /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. * [param position] is the offset from the body origin in global coordinates. */ add_constant_force(force: Vector2, position: Vector2 = Vector2.ZERO): void /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = 0`. */ add_constant_torque(torque: float64): void /** Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. * * **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. */ get_colliding_bodies(): GArray /** The body's mass. */ get mass(): float64 set mass(value: float64) /** The physics material override for the body. * If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. */ get physics_material_override(): PhysicsMaterial set physics_material_override(value: PhysicsMaterial) /** Multiplies the gravity applied to the body. The body's gravity is calculated from the [member ProjectSettings.physics/2d/default_gravity] project setting and/or any additional gravity vector applied by [Area2D]s. */ get gravity_scale(): float64 set gravity_scale(value: float64) /** Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. */ get center_of_mass_mode(): int64 set center_of_mass_mode(value: int64) /** The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. * When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. */ get center_of_mass(): Vector2 set center_of_mass(value: Vector2) /** The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. * If set to `0`, inertia is automatically computed (default value). * * **Note:** This value does not change when inertia is automatically computed. Use [PhysicsServer2D] to get the computed inertia. * */ get inertia(): float64 set inertia(value: float64) /** If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods. */ get sleeping(): boolean set sleeping(value: boolean) /** If `true`, the body can enter sleep mode when there is no movement. See [member sleeping]. */ get can_sleep(): boolean set can_sleep(value: boolean) /** If `true`, the body cannot rotate. Gravity and forces only apply linear movement. */ get lock_rotation(): boolean set lock_rotation(value: boolean) /** If `true`, the body is frozen. Gravity and forces are not applied anymore. * See [member freeze_mode] to set the body's behavior when frozen. * For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead. */ get freeze(): boolean set freeze(value: boolean) /** The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values. * For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead. */ get freeze_mode(): int64 set freeze_mode(value: int64) /** If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] method, if that virtual method is overridden. * Setting this property will call the method [method PhysicsServer2D.body_set_omit_force_integration] internally. */ get custom_integrator(): boolean set custom_integrator(value: boolean) /** Continuous collision detection mode. * Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details. */ get continuous_cd(): int64 set continuous_cd(value: int64) /** If `true`, the RigidBody2D will emit signals when it collides with another body. * * **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. */ get contact_monitor(): boolean set contact_monitor(value: boolean) /** The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to `true` to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. * * **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). */ get max_contacts_reported(): int64 set max_contacts_reported(value: int64) /** The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. */ get linear_velocity(): Vector2 set linear_velocity(value: Vector2) /** Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. */ get linear_damp_mode(): int64 set linear_damp_mode(value: int64) /** Damps the body's movement. By default, the body will use the [member ProjectSettings.physics/2d/default_linear_damp] setting or any value override set by an [Area2D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. * See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping. */ get linear_damp(): float64 set linear_damp(value: float64) /** The body's rotational velocity in *radians* per second. */ get angular_velocity(): float64 set angular_velocity(value: float64) /** Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. */ get angular_damp_mode(): int64 set angular_damp_mode(value: int64) /** Damps the body's rotation. By default, the body will use the [member ProjectSettings.physics/2d/default_angular_damp] setting or any value override set by an [Area2D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. * See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping. */ get angular_damp(): float64 set angular_damp(value: float64) /** The body's total constant positional forces applied during each physics update. * See [method add_constant_force] and [method add_constant_central_force]. */ get constant_force(): Vector2 set constant_force(value: Vector2) /** The body's total constant rotational forces applied during each physics update. * See [method add_constant_torque]. */ get constant_torque(): float64 set constant_torque(value: float64) /** Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. * [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. * [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. * [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. */ readonly body_shape_entered: Signal4 /** Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. * [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. * [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. * [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. */ readonly body_shape_exited: Signal4 /** Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. */ readonly body_entered: Signal1 /** Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. */ readonly body_exited: Signal1 /** Emitted when the physics engine changes the body's sleeping state. * * **Note:** Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. */ readonly sleeping_state_changed: Signal0 } namespace RigidBody3D { enum FreezeMode { /** Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. */ FREEZE_MODE_STATIC = 0, /** Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. */ FREEZE_MODE_KINEMATIC = 1, } enum CenterOfMassMode { /** In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. */ CENTER_OF_MASS_MODE_AUTO = 0, /** In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. */ CENTER_OF_MASS_MODE_CUSTOM = 1, } enum DampMode { /** In this mode, the body's damping value is added to any value set in areas or the default value. */ DAMP_MODE_COMBINE = 0, /** In this mode, the body's damping value replaces any value set in areas or the default value. */ DAMP_MODE_REPLACE = 1, } } /** A 3D physics body that is moved by a physics simulation. * * @link https://docs.godotengine.org/en/4.4/classes/class_rigidbody3d.html */ class RigidBody3D = Record> extends PhysicsBody3D { constructor(identifier?: any) /** Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body. */ /* gdvirtual */ _integrate_forces(state: PhysicsDirectBodyState3D): void /** Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. */ get_inverse_inertia_tensor(): Basis /** Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). * * **Note:** To retrieve the colliding bodies, use [method get_colliding_bodies]. */ get_contact_count(): int64 /** Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. */ set_axis_velocity(axis_velocity: Vector3): void /** Applies a directional impulse without affecting rotation. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * This is equivalent to using [method apply_impulse] at the body's center of mass. */ apply_central_impulse(impulse: Vector3): void /** Applies a positioned impulse to the body. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * [param position] is the offset from the body origin in global coordinates. */ apply_impulse(impulse: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void /** Applies a rotational impulse to the body without affecting the position. * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). * * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia]. */ apply_torque_impulse(impulse: Vector3): void /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. * This is equivalent to using [method apply_force] at the body's center of mass. */ apply_central_force(force: Vector3): void /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. * [param position] is the offset from the body origin in global coordinates. */ apply_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. * * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia]. */ apply_torque(torque: Vector3): void /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. * This is equivalent to using [method add_constant_force] at the body's center of mass. */ add_constant_central_force(force: Vector3): void /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. * [param position] is the offset from the body origin in global coordinates. */ add_constant_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = Vector3(0, 0, 0)`. */ add_constant_torque(torque: Vector3): void /** Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. * * **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. */ get_colliding_bodies(): GArray /** The body's mass. */ get mass(): float64 set mass(value: float64) /** The physics material override for the body. * If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. */ get physics_material_override(): PhysicsMaterial set physics_material_override(value: PhysicsMaterial) /** This is multiplied by [member ProjectSettings.physics/3d/default_gravity] to produce this body's gravity. For example, a value of `1.0` will apply normal gravity, `2.0` will apply double the gravity, and `0.5` will apply half the gravity to this body. */ get gravity_scale(): float64 set gravity_scale(value: float64) /** Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. */ get center_of_mass_mode(): int64 set center_of_mass_mode(value: int64) /** The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. * When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. */ get center_of_mass(): Vector3 set center_of_mass(value: Vector3) /** The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. * If set to [constant Vector3.ZERO], inertia is automatically computed (default value). * * **Note:** This value does not change when inertia is automatically computed. Use [PhysicsServer3D] to get the computed inertia. * */ get inertia(): Vector3 set inertia(value: Vector3) /** If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods. */ get sleeping(): boolean set sleeping(value: boolean) /** If `true`, the body can enter sleep mode when there is no movement. See [member sleeping]. */ get can_sleep(): boolean set can_sleep(value: boolean) /** If `true`, the body cannot rotate. Gravity and forces only apply linear movement. */ get lock_rotation(): boolean set lock_rotation(value: boolean) /** If `true`, the body is frozen. Gravity and forces are not applied anymore. * See [member freeze_mode] to set the body's behavior when frozen. * For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead. */ get freeze(): boolean set freeze(value: boolean) /** The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values. * For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead. */ get freeze_mode(): int64 set freeze_mode(value: int64) /** If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] method, if that virtual method is overridden. * Setting this property will call the method [method PhysicsServer3D.body_set_omit_force_integration] internally. */ get custom_integrator(): boolean set custom_integrator(value: boolean) /** If `true`, continuous collision detection is used. * Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. */ get continuous_cd(): boolean set continuous_cd(value: boolean) /** If `true`, the RigidBody3D will emit signals when it collides with another body. * * **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. */ get contact_monitor(): boolean set contact_monitor(value: boolean) /** The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to `true` to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. * * **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). */ get max_contacts_reported(): int64 set max_contacts_reported(value: int64) /** The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. */ get linear_velocity(): Vector3 set linear_velocity(value: Vector3) /** Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. */ get linear_damp_mode(): int64 set linear_damp_mode(value: int64) /** Damps the body's movement. By default, the body will use the [member ProjectSettings.physics/3d/default_linear_damp] project setting or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. * See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. */ get linear_damp(): float64 set linear_damp(value: float64) /** The RigidBody3D's rotational velocity in *radians* per second. */ get angular_velocity(): Vector3 set angular_velocity(value: Vector3) /** Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. */ get angular_damp_mode(): int64 set angular_damp_mode(value: int64) /** Damps the body's rotation. By default, the body will use the [member ProjectSettings.physics/3d/default_angular_damp] project setting or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. * See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. */ get angular_damp(): float64 set angular_damp(value: float64) /** The body's total constant positional forces applied during each physics update. * See [method add_constant_force] and [method add_constant_central_force]. */ get constant_force(): Vector3 set constant_force(value: Vector3) /** The body's total constant rotational forces applied during each physics update. * See [method add_constant_torque]. */ get constant_torque(): Vector3 set constant_torque(value: Vector3) /** Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. * [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. * [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. * [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. */ readonly body_shape_entered: Signal4 /** Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. * [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. * [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. * [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. */ readonly body_shape_exited: Signal4 /** Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. */ readonly body_entered: Signal1 /** Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. */ readonly body_exited: Signal1 /** Emitted when the physics engine changes the body's sleeping state. * * **Note:** Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. */ readonly sleeping_state_changed: Signal0 } /** Editor-only helper for setting up root motion in [AnimationMixer]. * * @link https://docs.godotengine.org/en/4.4/classes/class_rootmotionview.html */ class RootMotionView = Record> extends VisualInstance3D { constructor(identifier?: any) /** Path to an [AnimationMixer] node to use as a basis for root motion. */ get animation_path(): NodePath set animation_path(value: NodePath | string) /** The grid's color. */ get color(): Color set color(value: Color) /** The grid's cell size in 3D units. */ get cell_size(): float64 set cell_size(value: float64) /** The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached. */ get radius(): float64 set radius(value: float64) /** If `true`, the grid's points will all be on the same Y coordinate ( *local* Y = 0). If `false`, the points' original Y coordinate is preserved. */ get zero_y(): boolean set zero_y(value: boolean) } class RunInstancesDialog = Record> extends AcceptDialog { constructor(identifier?: any) } class SceneCacheInterface extends RefCounted { constructor(identifier?: any) } class SceneCreateDialog = Record> extends ConfirmationDialog { constructor(identifier?: any) } class SceneExporterGLTFPlugin = Record> extends EditorPlugin { constructor(identifier?: any) } class SceneImportSettingsData extends Object { constructor(identifier?: any) } class SceneImportSettingsDialog = Record> extends ConfirmationDialog { constructor(identifier?: any) } /** High-level multiplayer API implementation. * * @link https://docs.godotengine.org/en/4.4/classes/class_scenemultiplayer.html */ class SceneMultiplayer extends MultiplayerAPI { constructor(identifier?: any) /** Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). */ clear(): void /** Disconnects the peer identified by [param id], removing it from the list of connected peers, and closing the underlying connection with it. */ disconnect_peer(id: int64): void /** Returns the IDs of the peers currently trying to authenticate with this [MultiplayerAPI]. */ get_authenticating_peers(): PackedInt32Array /** Sends the specified [param data] to the remote peer identified by [param id] as part of an authentication message. This can be used to authenticate peers, and control when [signal MultiplayerAPI.peer_connected] is emitted (and the remote peer accepted as one of the connected peers). */ send_auth(id: int64, data: PackedByteArray | byte[] | ArrayBuffer): GError /** Mark the authentication step as completed for the remote peer identified by [param id]. The [signal MultiplayerAPI.peer_connected] signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. * If a peer disconnects before completing authentication, either due to a network issue, the [member auth_timeout] expiring, or manually calling [method disconnect_peer], the [signal peer_authentication_failed] signal will be emitted instead of [signal MultiplayerAPI.peer_disconnected]. */ complete_auth(id: int64): GError /** Sends the given raw [param bytes] to a specific peer identified by [param id] (see [method MultiplayerPeer.set_target_peer]). Default ID is `0`, i.e. broadcast to all peers. */ send_bytes(bytes: PackedByteArray | byte[] | ArrayBuffer, id: int64 = 0, mode: MultiplayerPeer.TransferMode = 2, channel: int64 = 0): GError /** The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. * This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. */ get root_path(): NodePath set root_path(value: NodePath | string) /** The callback to execute when receiving authentication data sent via [method send_auth]. If the [Callable] is empty (default), peers will be automatically accepted as soon as they connect. */ get auth_callback(): Callable set auth_callback(value: Callable) /** If set to a value greater than `0.0`, the maximum duration in seconds peers can stay in the authenticating state, after which the authentication will automatically fail. See the [signal peer_authenticating] and [signal peer_authentication_failed] signals. */ get auth_timeout(): float64 set auth_timeout(value: float64) /** If `true`, the MultiplayerAPI will allow encoding and decoding of object during RPCs. * **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution. */ get allow_object_decoding(): boolean set allow_object_decoding(value: boolean) /** If `true`, the MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] refuses new incoming connections. */ get refuse_new_connections(): boolean set refuse_new_connections(value: boolean) /** Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is `false`, clients won't be automatically notified of other peers and won't be able to send them packets through the server. * * **Note:** Changing this option while other peers are connected may lead to unexpected behaviors. * * **Note:** Support for this feature may depend on the current [MultiplayerPeer] configuration. See [method MultiplayerPeer.is_server_relay_supported]. */ get server_relay(): boolean set server_relay(value: boolean) /** Maximum size of each synchronization packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of packet loss. See [MultiplayerSynchronizer]. */ get max_sync_packet_size(): int64 set max_sync_packet_size(value: int64) /** Maximum size of each delta packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of causing networking congestion (higher latency, disconnections). See [MultiplayerSynchronizer]. */ get max_delta_packet_size(): int64 set max_delta_packet_size(value: int64) /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] connects to a new peer and a valid [member auth_callback] is set. In this case, the [signal MultiplayerAPI.peer_connected] will not be emitted until [method complete_auth] is called with given peer [param id]. While in this state, the peer will not be included in the list returned by [method MultiplayerAPI.get_peers] (but in the one returned by [method get_authenticating_peers]), and only authentication data will be sent or received. See [method send_auth] for sending authentication data. */ readonly peer_authenticating: Signal1 /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] disconnects from a peer for which authentication had not yet completed. See [signal peer_authenticating]. */ readonly peer_authentication_failed: Signal1 /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] receives a [param packet] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. */ readonly peer_packet: Signal2 } class SceneRPCInterface extends RefCounted { constructor(identifier?: any) } namespace SceneReplicationConfig { enum ReplicationMode { /** Do not keep the given property synchronized. */ REPLICATION_MODE_NEVER = 0, /** Replicate the given property on process by constantly sending updates using unreliable transfer mode. */ REPLICATION_MODE_ALWAYS = 1, /** Replicate the given property on process by sending updates using reliable transfer mode when its value changes. */ REPLICATION_MODE_ON_CHANGE = 2, } } /** Configuration for properties to synchronize with a [MultiplayerSynchronizer]. * * @link https://docs.godotengine.org/en/4.4/classes/class_scenereplicationconfig.html */ class SceneReplicationConfig extends Resource { constructor(identifier?: any) /** Returns a list of synchronized property [NodePath]s. */ get_properties(): GArray /** Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index]. * * **Note:** For details on restrictions and limitations on property synchronization, see [MultiplayerSynchronizer]. */ add_property(path: NodePath | string, index: int64 = -1): void /** Returns `true` if the given [param path] is configured for synchronization. */ has_property(path: NodePath | string): boolean /** Removes the property identified by the given [param path] from the configuration. */ remove_property(path: NodePath | string): void /** Finds the index of the given [param path]. */ property_get_index(path: NodePath | string): int64 /** Returns `true` if the property identified by the given [param path] is configured to be synchronized on spawn. */ property_get_spawn(path: NodePath | string): boolean /** Sets whether the property identified by the given [param path] is configured to be synchronized on spawn. */ property_set_spawn(path: NodePath | string, enabled: boolean): void /** Returns the replication mode for the property identified by the given [param path]. See [enum ReplicationMode]. */ property_get_replication_mode(path: NodePath | string): SceneReplicationConfig.ReplicationMode /** Sets the synchronization mode for the property identified by the given [param path]. See [enum ReplicationMode]. */ property_set_replication_mode(path: NodePath | string, mode: SceneReplicationConfig.ReplicationMode): void /** Returns `true` if the property identified by the given [param path] is configured to be synchronized on process. */ property_get_sync(path: NodePath | string): boolean /** Sets whether the property identified by the given [param path] is configured to be synchronized on process. */ property_set_sync(path: NodePath | string, enabled: boolean): void /** Returns `true` if the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. */ property_get_watch(path: NodePath | string): boolean /** Sets whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. */ property_set_watch(path: NodePath | string, enabled: boolean): void } class SceneReplicationInterface extends RefCounted { constructor(identifier?: any) } namespace SceneState { enum GenEditState { /** If passed to [method PackedScene.instantiate], blocks edits to the scene state. */ GEN_EDIT_STATE_DISABLED = 0, /** If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene. * * **Note:** Only available in editor builds. */ GEN_EDIT_STATE_INSTANCE = 1, /** If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. * * **Note:** Only available in editor builds. */ GEN_EDIT_STATE_MAIN = 2, /** If passed to [method PackedScene.instantiate], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one. * * **Note:** Only available in editor builds. */ GEN_EDIT_STATE_MAIN_INHERITED = 3, } } /** Provides access to a scene file's information. * * @link https://docs.godotengine.org/en/4.4/classes/class_scenestate.html */ class SceneState extends RefCounted { constructor(identifier?: any) /** Returns the number of nodes in the scene. * The `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`. */ get_node_count(): int64 /** Returns the type of the node at [param idx]. */ get_node_type(idx: int64): StringName /** Returns the name of the node at [param idx]. */ get_node_name(idx: int64): StringName /** Returns the path to the node at [param idx]. * If [param for_parent] is `true`, returns the path of the [param idx] node's parent instead. */ get_node_path(idx: int64, for_parent: boolean = false): NodePath /** Returns the path to the owner of the node at [param idx], relative to the root node. */ get_node_owner_path(idx: int64): NodePath /** Returns `true` if the node at [param idx] is an [InstancePlaceholder]. */ is_node_instance_placeholder(idx: int64): boolean /** Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder]. */ get_node_instance_placeholder(idx: int64): string /** Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance. */ get_node_instance(idx: int64): PackedScene /** Returns the list of group names associated with the node at [param idx]. */ get_node_groups(idx: int64): PackedStringArray /** Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [param idx] argument used here and in other methods. */ get_node_index(idx: int64): int64 /** Returns the number of exported or overridden properties for the node at [param idx]. * The `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`. */ get_node_property_count(idx: int64): int64 /** Returns the name of the property at [param prop_idx] for the node at [param idx]. */ get_node_property_name(idx: int64, prop_idx: int64): StringName /** Returns the value of the property at [param prop_idx] for the node at [param idx]. */ get_node_property_value(idx: int64, prop_idx: int64): any /** Returns the number of signal connections in the scene. * The `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`. */ get_connection_count(): int64 /** Returns the path to the node that owns the signal at [param idx], relative to the root node. */ get_connection_source(idx: int64): NodePath /** Returns the name of the signal at [param idx]. */ get_connection_signal(idx: int64): StringName /** Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node. */ get_connection_target(idx: int64): NodePath /** Returns the method connected to the signal at [param idx]. */ get_connection_method(idx: int64): StringName /** Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants. */ get_connection_flags(idx: int64): int64 /** Returns the list of bound parameters for the signal at [param idx]. */ get_connection_binds(idx: int64): GArray /** Returns the number of unbound parameters for the signal at [param idx]. */ get_connection_unbinds(idx: int64): int64 } class SceneTileProxyObject extends Object { constructor(identifier?: any) readonly changed: Signal1 } namespace SceneTree { enum GroupCallFlags { /** Call nodes within a group with no special behavior (default). */ GROUP_CALL_DEFAULT = 0, /** Call nodes within a group in reverse tree hierarchy order (all nested children are called before their respective parent nodes). */ GROUP_CALL_REVERSE = 1, /** Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to [method Object.call_deferred]. */ GROUP_CALL_DEFERRED = 2, /** Call nodes within a group only once, even if the call is executed many times in the same frame. Must be combined with [constant GROUP_CALL_DEFERRED] to work. * * **Note:** Different arguments are not taken into account. Therefore, when the same call is executed with different arguments, only the first call will be performed. */ GROUP_CALL_UNIQUE = 4, } } /** Manages the game loop via a hierarchy of nodes. * * @link https://docs.godotengine.org/en/4.4/classes/class_scenetree.html */ class SceneTree extends MainLoop { constructor(identifier?: any) /** Returns `true` if a node added to the given group [param name] exists in the tree. */ has_group(name: StringName): boolean /** Returns a new [SceneTreeTimer]. After [param time_sec] in seconds have passed, the timer will emit [signal SceneTreeTimer.timeout] and will be automatically freed. * If [param process_always] is `false`, the timer will be paused when setting [member SceneTree.paused] to `true`. * If [param process_in_physics] is `true`, the timer will update at the end of the physics frame, instead of the process frame. * If [param ignore_time_scale] is `true`, the timer will ignore [member Engine.time_scale] and update with the real, elapsed time. * This method is commonly used to create a one-shot delay timer, as in the following example: * * * **Note:** The timer is always updated *after* all of the nodes in the tree. A node's [method Node._process] method would be called before the timer updates (or [method Node._physics_process] if [param process_in_physics] is set to `true`). */ create_timer(time_sec: float64, process_always: boolean = true, process_in_physics: boolean = false, ignore_time_scale: boolean = false): SceneTreeTimer /** Creates and returns a new [Tween] processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its [enum Tween.TweenProcessMode]). * * **Note:** A [Tween] created using this method is not bound to any [Node]. It may keep working until there is nothing left to animate. If you want the [Tween] to be automatically killed when the [Node] is freed, use [method Node.create_tween] or [method Tween.bind_node]. */ create_tween(): Tween /** Returns an [Array] of currently existing [Tween]s in the tree, including paused tweens. */ get_processed_tweens(): GArray /** Returns the number of nodes inside this tree. */ get_node_count(): int64 /** Returns how many frames have been processed, since the application started. This is *not* a measurement of elapsed time. */ get_frame(): int64 /** Quits the application at the end of the current iteration, with the given [param exit_code]. * By convention, an exit code of `0` indicates success, whereas any other exit code indicates an error. For portability reasons, it should be between `0` and `125` (inclusive). * * **Note:** On iOS this method doesn't work. Instead, as recommended by the [url=https://developer.apple.com/library/archive/qa/qa1561/_index.html]iOS Human Interface Guidelines[/url], the user is expected to close apps via the Home button. */ quit(exit_code: int64 = 0): void /** Queues the given [param obj] to be deleted, calling its [method Object.free] at the end of the current frame. This method is similar to [method Node.queue_free]. */ queue_delete(obj: Object): void /** Calls the given [param method] on each node inside this tree added to the given [param group]. Use [param flags] to customize this method's behavior (see [enum GroupCallFlags]). Additional arguments for [param method] can be passed at the end of this method. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored. * * * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. */ call_group_flags(flags: int64, group: StringName, method: StringName, ...vargargs: any[]): void /** Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]). */ notify_group_flags(call_flags: int64, group: StringName, notification: int64): void /** Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]). * * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. */ set_group_flags(call_flags: int64, group: StringName, property: string, value: any): void /** Calls [param method] on each node inside this tree added to the given [param group]. You can pass arguments to [param method] by specifying them at the end of this method call. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored. See also [method set_group] and [method notify_group]. * * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. * * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. */ call_group(group: StringName, method: StringName, ...vargargs: any[]): void /** Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. See also [url=https://docs.godotengine.org/en/4.4/tutorials/best_practices/godot_notifications.html]Godot notifications[/url] and [method call_group] and [method set_group]. * * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. */ notify_group(group: StringName, notification: int64): void /** Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. See also [method call_group] and [method notify_group]. * * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. * * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. */ set_group(group: StringName, property: string, value: any): void /** Returns an [Array] containing all nodes inside this tree, that have been added to the given [param group], in scene hierarchy order. */ get_nodes_in_group(group: StringName): GArray /** Returns the first [Node] found inside the tree, that has been added to the given [param group], in scene hierarchy order. Returns `null` if no match is found. See also [method get_nodes_in_group]. */ get_first_node_in_group(group: StringName): Node /** Returns the number of nodes assigned to the given group. */ get_node_count_in_group(group: StringName): int64 /** Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance. * Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. * * **Note:** See [method change_scene_to_packed] for details on the order of operations. */ change_scene_to_file(path: string): GError /** Changes the running scene to a new instance of the given [PackedScene] (which must be valid). * Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid. * * **Note:** Operations happen in the following order when [method change_scene_to_packed] is called: * 1. The current scene node is immediately removed from the tree. From that point, [method Node.get_tree] called on the current (outgoing) scene will return `null`. [member current_scene] will be `null`, too, because the new scene is not available yet. * 2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. [method Node.get_tree] and [member current_scene] will be back to working as usual. * This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to [method Node.queue_free]. */ change_scene_to_packed(packed_scene: PackedScene): GError /** Reloads the currently active scene, replacing [member current_scene] with a new instance of its original [PackedScene]. * Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] is defined, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. */ reload_current_scene(): GError /** If a current scene is loaded, calling this method will unload it. */ unload_current_scene(): void /** Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty. * * **Note:** No [MultiplayerAPI] must be configured for the subpath containing [param root_path], nested custom multiplayers are not allowed. I.e. if one is configured for `"/root/Foo"` setting one for `"/root/Foo/Bar"` will cause an error. */ set_multiplayer(multiplayer: MultiplayerAPI, root_path: NodePath | string = ''): void /** Searches for the [MultiplayerAPI] configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See [method set_multiplayer]. */ get_multiplayer(for_path: NodePath | string = ''): MultiplayerAPI /** If `true`, the application automatically accepts quitting requests. * For mobile platforms, see [member quit_on_go_back]. */ get auto_accept_quit(): boolean set auto_accept_quit(value: boolean) /** If `true`, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). * To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST]. */ get quit_on_go_back(): boolean set quit_on_go_back(value: boolean) /** If `true`, collision shapes will be visible when running the game from the editor for debugging purposes. * * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_collisions_hint] while the project is running will not have the desired effect. */ get debug_collisions_hint(): boolean set debug_collisions_hint(value: boolean) /** If `true`, curves from [Path2D] and [Path3D] nodes will be visible when running the game from the editor for debugging purposes. * * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_paths_hint] while the project is running will not have the desired effect. */ get debug_paths_hint(): boolean set debug_paths_hint(value: boolean) /** If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes. * * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_navigation_hint] while the project is running will not have the desired effect. */ get debug_navigation_hint(): boolean set debug_navigation_hint(value: boolean) /** If `true`, the scene tree is considered paused. This causes the following behavior: * - 2D and 3D physics will be stopped, as well as collision detection and related signals. * - Depending on each node's [member Node.process_mode], their [method Node._process], [method Node._physics_process] and [method Node._input] callback methods may not called anymore. */ get paused(): boolean set paused(value: boolean) /** The root of the scene currently being edited in the editor. This is usually a direct child of [member root]. * * **Note:** This property does nothing in release builds. */ get edited_scene_root(): Node set edited_scene_root(value: Node) /** The root node of the currently loaded main scene, usually as a direct child of [member root]. See also [method change_scene_to_file], [method change_scene_to_packed], and [method reload_current_scene]. * **Warning:** Setting this property directly may not work as expected, as it does *not* add or remove any nodes from this tree. */ get current_scene(): Node set current_scene(value: Node) /** The tree's root [Window]. This is top-most [Node] of the scene tree, and is always present. An absolute [NodePath] always starts from this node. Children of the root node may include the loaded [member current_scene], as well as any [url=https://docs.godotengine.org/en/4.4/tutorials/scripting/singletons_autoload.html]AutoLoad[/url] configured in the Project Settings. * **Warning:** Do not delete this node. This will result in unstable behavior, followed by a crash. */ get root(): Node /** If `true` (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame]. * If `false`, you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. */ get multiplayer_poll(): boolean set multiplayer_poll(value: boolean) /** If `true`, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. * The default value of this property is controlled by [member ProjectSettings.physics/common/physics_interpolation]. */ get physics_interpolation(): boolean set physics_interpolation(value: boolean) /** Emitted any time the tree's hierarchy changes (nodes being moved, renamed, etc.). */ readonly tree_changed: Signal0 /** Emitted when the [member Node.process_mode] of any node inside the tree is changed. Only emitted in the editor, to update the visibility of disabled nodes. */ readonly tree_process_mode_changed: Signal0 /** Emitted when the [param node] enters this tree. */ readonly node_added: Signal1 /** Emitted when the [param node] exits this tree. */ readonly node_removed: Signal1 /** Emitted when the [param node]'s [member Node.name] is changed. */ readonly node_renamed: Signal1 /** Emitted when the [param node]'s [method Node.update_configuration_warnings] is called. Only emitted in the editor. */ readonly node_configuration_warning_changed: Signal1 /** Emitted immediately before [method Node._process] is called on every node in this tree. */ readonly process_frame: Signal0 /** Emitted immediately before [method Node._physics_process] is called on every node in this tree. */ readonly physics_frame: Signal0 } class SceneTreeDialog = Record> extends ConfirmationDialog { constructor(identifier?: any) _cancel(): void readonly selected: Signal1 } class SceneTreeDock = Record> extends VBoxContainer { constructor(identifier?: any) _post_do_create(_unnamed_arg0: Node): void _set_owners(_unnamed_arg0: Node, _unnamed_arg1: GArray): void _reparent_nodes_to_root(_unnamed_arg0: Node, _unnamed_arg1: GArray, _unnamed_arg2: Node): void _reparent_nodes_to_paths_with_transform_and_name(_unnamed_arg0: Node, _unnamed_arg1: GArray, _unnamed_arg2: GArray, _unnamed_arg3: GArray, _unnamed_arg4: GArray, _unnamed_arg5: Node): void _update_script_button(): void instantiate(_unnamed_arg0: string): void get_tree_editor(): SceneTreeEditor replace_node(_unnamed_arg0: Node, _unnamed_arg1: Node, _unnamed_arg2: boolean, _unnamed_arg3: boolean): void readonly remote_tree_selected: Signal0 readonly add_node_used: Signal0 readonly node_created: Signal1 } class SceneTreeEditor = Record> extends Control { constructor(identifier?: any) _update_tree(_unnamed_arg0: boolean = false): void update_tree(): void readonly node_selected: Signal0 readonly node_renamed: Signal0 readonly node_prerename: Signal0 readonly node_changed: Signal0 readonly nodes_dragged: Signal0 readonly nodes_rearranged: Signal3 readonly files_dropped: Signal3 readonly script_dropped: Signal2 readonly rmb_pressed: Signal1 readonly open: Signal0 readonly open_script: Signal0 } /** One-shot timer. * * @link https://docs.godotengine.org/en/4.4/classes/class_scenetreetimer.html */ class SceneTreeTimer extends RefCounted { constructor(identifier?: any) /** The time remaining (in seconds). */ get time_left(): float64 set time_left(value: float64) /** Emitted when the timer reaches 0. */ readonly timeout: Signal0 } class ScreenSelect = Record> extends Button { constructor(identifier?: any) readonly request_open_in_screen: Signal1 } /** A class stored as a resource. * * @link https://docs.godotengine.org/en/4.4/classes/class_script.html */ class Script extends Resource { constructor(identifier?: any) /** Returns `true` if the script can be instantiated. */ can_instantiate(): boolean /** Returns `true` if [param base_object] is an instance of this script. */ instance_has(base_object: Object): boolean /** Returns `true` if the script contains non-empty source code. * * **Note:** If a script does not have source code, this does not mean that it is invalid or unusable. For example, a [GDScript] that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with [method can_instantiate]. */ has_source_code(): boolean /** Reloads the script's class implementation. Returns an error code. */ reload(keep_state: boolean = false): GError /** Returns the script directly inherited by this script. */ get_base_script(): Script /** Returns the script's base type. */ get_instance_base_type(): StringName /** Returns the class name associated with the script, if there is one. Returns an empty string otherwise. * To give the script a global name, you can use the `class_name` keyword in GDScript and the `[GlobalClass]` attribute in C#. * */ get_global_name(): StringName /** Returns `true` if the script, or a base class, defines a signal with the given name. */ has_script_signal(signal_name: StringName): boolean /** Returns the list of properties in this [Script]. */ get_script_property_list(): GArray /** Returns the list of methods in this [Script]. */ get_script_method_list(): GArray /** Returns the list of user signals defined in this [Script]. */ get_script_signal_list(): GArray /** Returns a dictionary containing constant names and their values. */ get_script_constant_map(): GDictionary /** Returns the default value of the specified property. */ get_property_default_value(property: StringName): any /** Returns `true` if the script is a tool script. A tool script can run in the editor. */ is_tool(): boolean /** Returns `true` if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated. */ is_abstract(): boolean /** Returns a [Dictionary] mapping method names to their RPC configuration defined by this script. */ get_rpc_config(): any /** The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically. */ get source_code(): string set source_code(value: string) } /** Godot editor's popup dialog for creating new [Script] files. * * @link https://docs.godotengine.org/en/4.4/classes/class_scriptcreatedialog.html */ class ScriptCreateDialog = Record> extends ConfirmationDialog { constructor(identifier?: any) /** Prefills required fields to configure the ScriptCreateDialog for use. */ config(inherits: string, path: string, built_in_enabled: boolean = true, load_enabled: boolean = true): void /** Emitted when the user clicks the OK button. */ readonly script_created: Signal1