diff options
Diffstat (limited to 'doc/classes/PhysicsServer2D.xml')
-rw-r--r-- | doc/classes/PhysicsServer2D.xml | 113 |
1 files changed, 66 insertions, 47 deletions
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index b2904c6538..229facd08b 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -58,7 +58,7 @@ <return type="RID"> </return> <description> - Creates an [Area2D]. + Creates an [Area2D]. After creating an [Area2D] with this method, assign it to a space using [method area_set_space] to use the created [Area2D] in the physics world. </description> </method> <method name="area_get_canvas_instance_id" qualifiers="const"> @@ -659,11 +659,9 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="userdata" type="Variant" default="null"> + <argument index="2" name="userdata" type="Variant" default="null"> </argument> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). @@ -804,6 +802,7 @@ </argument> <description> Sets a body state using one of the [enum BodyState] constants. + Note that the method doesn't take effect immediately. The state will change on the next physics frame. </description> </method> <method name="body_test_motion"> @@ -849,21 +848,6 @@ <description> </description> </method> - <method name="damped_spring_joint_create"> - <return type="RID"> - </return> - <argument index="0" name="anchor_a" type="Vector2"> - </argument> - <argument index="1" name="anchor_b" type="Vector2"> - </argument> - <argument index="2" name="body_a" type="RID"> - </argument> - <argument index="3" name="body_b" type="RID"> - </argument> - <description> - Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. - </description> - </method> <method name="damped_spring_joint_get_param" qualifiers="const"> <return type="float"> </return> @@ -906,21 +890,18 @@ Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states. </description> </method> - <method name="groove_joint_create"> - <return type="RID"> + <method name="joint_clear"> + <return type="void"> </return> - <argument index="0" name="groove1_a" type="Vector2"> - </argument> - <argument index="1" name="groove2_a" type="Vector2"> - </argument> - <argument index="2" name="anchor_b" type="Vector2"> - </argument> - <argument index="3" name="body_a" type="RID"> - </argument> - <argument index="4" name="body_b" type="RID"> + <argument index="0" name="joint" type="RID"> </argument> <description> - Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself. + </description> + </method> + <method name="joint_create"> + <return type="RID"> + </return> + <description> </description> </method> <method name="joint_get_param" qualifiers="const"> @@ -943,36 +924,71 @@ Returns a joint's type (see [enum JointType]). </description> </method> - <method name="joint_set_param"> + <method name="joint_make_damped_spring"> <return type="void"> </return> <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> + <argument index="1" name="anchor_a" type="Vector2"> </argument> - <argument index="2" name="value" type="float"> + <argument index="2" name="anchor_b" type="Vector2"> + </argument> + <argument index="3" name="body_a" type="RID"> + </argument> + <argument index="4" name="body_b" type="RID"> </argument> <description> - Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> - <method name="line_shape_create"> - <return type="RID"> + <method name="joint_make_groove"> + <return type="void"> </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="groove1_a" type="Vector2"> + </argument> + <argument index="2" name="groove2_a" type="Vector2"> + </argument> + <argument index="3" name="anchor_b" type="Vector2"> + </argument> + <argument index="4" name="body_a" type="RID"> + </argument> + <argument index="5" name="body_b" type="RID"> + </argument> <description> </description> </method> - <method name="pin_joint_create"> - <return type="RID"> + <method name="joint_make_pin"> + <return type="void"> </return> - <argument index="0" name="anchor" type="Vector2"> + <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="body_a" type="RID"> + <argument index="1" name="anchor" type="Vector2"> </argument> - <argument index="2" name="body_b" type="RID"> + <argument index="2" name="body_a" type="RID"> + </argument> + <argument index="3" name="body_b" type="RID"> </argument> <description> - Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. + </description> + </method> + <method name="joint_set_param"> + <return type="void"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + Sets a joint parameter. See [enum JointParam] for a list of available parameters. + </description> + </method> + <method name="line_shape_create"> + <return type="RID"> + </return> + <description> </description> </method> <method name="ray_shape_create"> @@ -1232,15 +1248,18 @@ <constant name="BODY_STATE_CAN_SLEEP" value="4" enum="BodyState"> Constant to set/get whether the body can sleep. </constant> - <constant name="JOINT_PIN" value="0" enum="JointType"> + <constant name="JOINT_TYPE_PIN" value="0" enum="JointType"> Constant to create pin joints. </constant> - <constant name="JOINT_GROOVE" value="1" enum="JointType"> + <constant name="JOINT_TYPE_GROOVE" value="1" enum="JointType"> Constant to create groove joints. </constant> - <constant name="JOINT_DAMPED_SPRING" value="2" enum="JointType"> + <constant name="JOINT_TYPE_DAMPED_SPRING" value="2" enum="JointType"> Constant to create damped spring joints. </constant> + <constant name="JOINT_TYPE_MAX" value="3" enum="JointType"> + Represents the size of the [enum JointType] enum. + </constant> <constant name="JOINT_PARAM_BIAS" value="0" enum="JointParam"> </constant> <constant name="JOINT_PARAM_MAX_BIAS" value="1" enum="JointParam"> |