summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml17
-rw-r--r--doc/classes/CharacterBody2D.xml7
-rw-r--r--doc/classes/EditorPlugin.xml16
-rw-r--r--doc/classes/PhysicsServer2D.xml3
-rw-r--r--doc/classes/PhysicsServer3D.xml3
-rw-r--r--doc/classes/SoftBody3D.xml23
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/Vector2.xml12
8 files changed, 56 insertions, 27 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 585b94a522..616d88c7f3 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -99,14 +99,6 @@
[b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
</description>
</method>
- <method name="cartesian2polar">
- <return type="Vector2" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <description>
- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
- </description>
- </method>
<method name="ceil">
<return type="float" />
<argument index="0" name="x" type="float" />
@@ -521,14 +513,6 @@
[b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
- <method name="polar2cartesian">
- <return type="Vector2" />
- <argument index="0" name="r" type="float" />
- <argument index="1" name="th" type="float" />
- <description>
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
- </description>
- </method>
<method name="posmod">
<return type="int" />
<argument index="0" name="x" type="int" />
@@ -2474,6 +2458,7 @@
<constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
</constant>
<constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags">
+ Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index e5f60541b9..71e6eeab5a 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -152,8 +152,11 @@
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
- <member name="moving_platform_ignore_layers" type="int" setter="set_moving_platform_ignore_layers" getter="get_moving_platform_ignore_layers" default="0">
- Collision layers that will be excluded for detecting bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all touching bodies are detected and propagate their velocity. You can add excluded layers to ignore bodies that are contained in these layers.
+ <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ </member>
+ <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index e564e8045c..b8436be76a 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -56,11 +56,11 @@
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func _forward_spatial_3d_over_viewport(overlay):
+ func _forward_3d_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64)
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -68,13 +68,13 @@
return false
[/gdscript]
[csharp]
- public override void ForwardSpatialDrawOverViewport(Godot.Control overlay)
+ public override void _Forward3dDrawOverViewport(Godot.Control overlay)
{
// Draw a circle at cursor position.
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
@@ -104,12 +104,12 @@
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
return true
[/gdscript]
[csharp]
// Prevents the InputEvent to reach other Editor classes.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return true;
}
@@ -119,12 +119,12 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return @event is InputEventMouseMotion;
}
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index d0ae665139..9867b98ae6 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -489,6 +489,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState2D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index c47a311161..46cbe48b28 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -478,6 +478,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml
index ddfc14ceac..d5f0e3c95c 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -42,6 +42,20 @@
<description>
</description>
</method>
+ <method name="get_point_transform">
+ <return type="Vector3" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns local translation of a vertex in the surface array.
+ </description>
+ </method>
+ <method name="is_point_pinned" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns [code]true[/code] if vertex is set to pinned.
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void" />
<argument index="0" name="body" type="Node" />
@@ -65,6 +79,15 @@
Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
+ <method name="set_point_pinned">
+ <return type="void" />
+ <argument index="0" name="point_index" type="int" />
+ <argument index="1" name="pinned" type="bool" />
+ <argument index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <description>
+ Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to.
+ </description>
+ </method>
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index de9eb518c6..eb6c52d662 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -248,7 +248,7 @@
Returns [code]true[/code] if the length of the string equals [code]0[/code].
</description>
</method>
- <method name="is_rel_path" qualifiers="const">
+ <method name="is_relative_path" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory ([code]./[/code]), or the current [Node].
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index cb5662419e..ab4d0e181a 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -155,6 +155,18 @@
Returns the vector with all components rounded down (towards negative infinity).
</description>
</method>
+ <method name="from_angle" qualifiers="static">
+ <return type="Vector2" />
+ <argument index="0" name="angle" type="float" />
+ <description>
+ Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
+ [codeblock]
+ print(Vector2.from_angle(0)) # Prints (1, 0).
+ print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.
+ print(Vector2.from_angle(PI / 2)) # Prints (0, 1).
+ [/codeblock]
+ </description>
+ </method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<argument index="0" name="to" type="Vector2" />