diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index 52c89248ff3..5b320a051f5 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -4,9 +4,10 @@ Direct access object to a physics body in the [Physics2DServer]. - Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. + Provides direct access to a physics body in the [Physics2DServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html @@ -17,6 +18,7 @@ + Adds a constant directional force without affecting rotation. @@ -27,6 +29,7 @@ + Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -35,6 +38,7 @@ + Adds a constant rotational force. @@ -43,6 +47,7 @@ + Applies a directional impulse without affecting rotation. @@ -53,6 +58,7 @@ + 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). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -61,6 +67,7 @@ + Applies a rotational impulse to the body. @@ -69,7 +76,7 @@ - Return the [RID] of the collider. + Returns the collider's [RID]. @@ -78,7 +85,7 @@ - Return the object id of the collider. + Returns the collider's object id. @@ -87,7 +94,7 @@ - Return the collider object, this depends on how it was created (will return a scene node if such was used to create it). + Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). @@ -96,7 +103,7 @@ - Return the contact position in the collider. + Returns the contact position in the collider. @@ -105,7 +112,7 @@ - Return the collider shape index. + Returns the collider's shape index. @@ -114,7 +121,7 @@ - Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. @@ -123,14 +130,14 @@ - Return the linear velocity vector at contact point of the collider. + Returns the linear velocity vector at the collider's contact point. - Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. + Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See [member RigidBody2D.contact_monitor]. @@ -139,7 +146,7 @@ - Return the local normal (of this body) of the contact point. + Returns the local normal at the contact point. @@ -148,7 +155,7 @@ - Return the local position (of this body) of the contact point. + Returns the local position of the contact point. @@ -157,27 +164,27 @@ - Return the local shape index of the collision. + Returns the local shape index of the collision. - Return the current state of space, useful for queries. + Returns the current state of the space, useful for queries. - Call the built-in force integration code. + Calls the built-in force integration code. - The angular velocity of the body. + The body's rotational velocity. The inverse of the inertia of the body. @@ -186,10 +193,10 @@ The inverse of the mass of the body. - The linear velocity of the body. + The body's linear velocity. - [code]true[/code] if this body is currently sleeping (not active). + If [code]true[/code], this body is currently sleeping (not active). The timestep (delta) used for the simulation. @@ -204,7 +211,7 @@ The rate at which the body stops moving, if there are not any other forces moving it. - The transformation matrix of the body. + The body's transformation matrix. diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index cf718f06b20..10b51991287 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -1,14 +1,16 @@ + Direct access object to a physics body in the [PhysicsServer]. + Provides direct access to a physics body in the [PhysicsServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody._integrate_forces]. - + ( @@ -27,7 +29,7 @@ - Adds a constant force (i.e. acceleration). + Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -36,7 +38,7 @@ - Adds a constant rotational force (i.e. a motor) without affecting position. + Adds a constant rotational force without affecting position. @@ -75,6 +77,7 @@ + Returns the collider's [RID]. @@ -83,6 +86,7 @@ + Returns the collider's object id. @@ -91,6 +95,7 @@ + Returns the collider object. @@ -99,6 +104,7 @@ + Returns the contact position in the collider. @@ -107,6 +113,7 @@ + Returns the collider's shape index. @@ -115,12 +122,14 @@ + Returns the linear velocity vector at the collider's contact point. + Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See [member RigidBody.contact_monitor]. @@ -138,6 +147,7 @@ + Returns the local normal at the contact point. @@ -146,6 +156,7 @@ + Returns the local position of the contact point. @@ -154,24 +165,27 @@ + Returns the local shape index of the collision. + Returns the current state of the space, useful for queries. + Calls the built-in force integration code. - The angular velocity of the body. + The body's rotational velocity. @@ -182,12 +196,12 @@ The inverse of the mass of the body. - The linear velocity of the body. + The body's linear velocity. - [code]true[/code] if this body is currently sleeping (not active). + If [code]true[/code], this body is currently sleeping (not active). The timestep (delta) used for the simulation. @@ -202,7 +216,7 @@ The rate at which the body stops moving, if there are not any other forces moving it. - The transformation matrix of the body. + The body's transformation matrix.