diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GDScript.xml | 7 | ||||
-rw-r--r-- | doc/classes/ARVRServer.xml | 2 | ||||
-rw-r--r-- | doc/classes/KinematicBody.xml | 2 | ||||
-rw-r--r-- | doc/classes/KinematicBody2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Particles2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/Shape2D.xml | 4 |
6 files changed, 15 insertions, 7 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 601b1385ae..072eec800f 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -539,7 +539,7 @@ </description> </method> <method name="lerp"> - <return type="float"> + <return type="Variant"> </return> <argument index="0" name="from" type="Variant"> </argument> @@ -549,8 +549,11 @@ </argument> <description> Linearly interpolates between two values by a normalized value. + If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float]. + If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method). [codeblock] - lerp(1, 3, 0.5) # returns 2 + lerp(0, 4, 0.75) # returns 3.0 + lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5) [/codeblock] </description> </method> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index a7d3e46684..e089360c46 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -56,7 +56,7 @@ <return type="int"> </return> <description> - Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look through the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. + Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. </description> </method> <method name="get_interfaces" qualifiers="const"> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index ad41f48ddd..a4fade6ab2 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 986010f832..b94304b9a8 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index a6d23ed0f2..91c1a0ca9b 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -16,12 +16,14 @@ <return type="Rect2"> </return> <description> + Returns a rectangle containing the positions of all existing particles. </description> </method> <method name="restart"> <return type="void"> </return> <description> + Restarts all the existing particles. </description> </method> </methods> @@ -39,8 +41,10 @@ How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> Amount of time each particle will exist. Default value: [code]1[/code]. @@ -49,6 +53,7 @@ If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + Normal map to be used for the [code]texture[/code] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 96b8a77d9e..fc773faf5e 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -27,7 +27,7 @@ </description> </method> <method name="collide_and_get_contacts"> - <return type="Variant"> + <return type="Array"> </return> <argument index="0" name="local_xform" type="Transform2D"> </argument> @@ -59,7 +59,7 @@ </description> </method> <method name="collide_with_motion_and_get_contacts"> - <return type="Variant"> + <return type="Array"> </return> <argument index="0" name="local_xform" type="Transform2D"> </argument> |