diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/CollisionObject2D.xml | 8 | ||||
-rw-r--r-- | doc/classes/KinematicBody2D.xml | 1 | ||||
-rw-r--r-- | doc/classes/PointMesh.xml | 17 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rw-r--r-- | doc/classes/String.xml | 28 | ||||
-rw-r--r-- | doc/classes/VehicleWheel.xml | 16 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 1 |
7 files changed, 66 insertions, 7 deletions
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index eb69a4aed4..b9ec9480cf 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -19,7 +19,7 @@ <argument index="2" name="shape_idx" type="int"> </argument> <description> - Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events. + Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events. </description> </method> <method name="create_shape_owner"> @@ -227,17 +227,17 @@ <argument index="2" name="shape_idx" type="int"> </argument> <description> - Emitted when an input event occurs. Requires [code]input_pickable[/code] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details. + Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details. </description> </signal> <signal name="mouse_entered"> <description> - Emitted when the mouse pointer enters any of this object's shapes. Requires [code]input_pickable[/code] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. </description> </signal> <signal name="mouse_exited"> <description> - Emitted when the mouse pointer exits all this object's shapes. Requires [code]input_pickable[/code] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. </description> </signal> </signals> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 39d84c6e31..22db9e3960 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -76,6 +76,7 @@ </argument> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. + If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. </description> </method> <method name="move_and_slide"> diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml new file mode 100644 index 0000000000..dc7dd065cf --- /dev/null +++ b/doc/classes/PointMesh.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PointMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> + <brief_description> + Mesh with a single Point primitive. + </brief_description> + <description> + The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud). + PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [SpatialMaterial] by setting [member SpatialMaterial.flags_use_point_size] and the variable [member SpatialMaterial.params_point_size]. + When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7ab29e67ae..2d6ab4f72c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -825,7 +825,7 @@ <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter="" default="true"> Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen. </member> - <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter="" default="true"> + <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter="" default="false"> Use high-quality voxel cone tracing. This results in better-looking reflections, but is much more expensive on the GPU. </member> <member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index e513a44b1d..6dc3e35558 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -272,6 +272,34 @@ Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal. </description> </method> + <method name="count"> + <return type="int"> + </return> + <argument index="0" name="what" type="String"> + </argument> + <argument index="1" name="from" type="int" default="0"> + </argument> + <argument index="2" name="to" type="int" default="0"> + </argument> + </argument> + <description> + Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. + </description> + </method> + <method name="countn"> + <return type="int"> + </return> + <argument index="0" name="what" type="String"> + </argument> + <argument index="1" name="from" type="int" default="0"> + </argument> + <argument index="2" name="to" type="int" default="0"> + </argument> + </argument> + <description> + Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. + </description> + </method> <method name="dedent"> <return type="String"> </return> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index 6de6429531..ff6004bcba 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -13,6 +13,7 @@ <return type="float"> </return> <description> + Returns the rotational speed of the wheel in revolutions per minute. </description> </method> <method name="get_skidinfo" qualifiers="const"> @@ -31,12 +32,23 @@ </method> </methods> <members> + <member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0"> + Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. + </member> <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83"> The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. </member> <member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation" default="0.88"> The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. </member> + <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> + Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. + A negative value will result in the wheel reversing. + </member> + <member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0"> + The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. + </member> <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0"> The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. </member> @@ -47,10 +59,10 @@ This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. </member> <member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering" default="false"> - If [code]true[/code], this wheel will be turned when the car steers. + If [code]true[/code], this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody.steering] and ignored if you are using the per-wheel [member steering] value instead. </member> <member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction" default="false"> - If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. + If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody.engine_force] and ignored if you are using the per-wheel [member engine_force] value instead. </member> <member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip" default="10.5"> This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 763c29ab4e..b42ae3ce01 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -347,6 +347,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f = open(os.path.join(output_dir, "class_" + class_name.lower() + '.rst'), 'w', encoding='utf-8') # Warn contributors not to edit this file directly + f.write(":github_url: hide\n\n") f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n") f.write(".. DO NOT EDIT THIS FILE, but the " + class_name + ".xml source instead.\n") f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n") |