Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 127 additions & 3 deletions docs/Classes/@GlobalScope.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ There are notable differences when using this API with C#. See the C# difference
</tr>
<tr>
<td>[Variant](Variant.md)</td>
<td>[lerp](#@GlobalScope_method_lerp)\ (\ from\: [Variant](Variant.md), to\: [Variant](Variant.md), weight\: [Variant](Variant.md)\ )</td>
<td>[lerp](#@GlobalScope_method_lerp)\ (\ from\: [Variant](Variant.md), to\: [Variant](Variant.md), weight\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
Expand Down Expand Up @@ -443,6 +443,22 @@ There are notable differences when using this API with C#. See the C# difference
<td>[int](int.md)</td>
<td>[mini](#@GlobalScope_method_mini)\ (\ a\: [int](int.md), b\: [int](int.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[monotonic_cubic_interpolate](#@GlobalScope_method_monotonic_cubic_interpolate)\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[monotonic_cubic_interpolate_angle](#@GlobalScope_method_monotonic_cubic_interpolate_angle)\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[monotonic_cubic_interpolate_angle_in_time](#@GlobalScope_method_monotonic_cubic_interpolate_angle_in_time)\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md), to_t\: [float](float.md), pre_t\: [float](float.md), post_t\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[monotonic_cubic_interpolate_in_time](#@GlobalScope_method_monotonic_cubic_interpolate_in_time)\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md), to_t\: [float](float.md), pre_t\: [float](float.md), post_t\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[move_toward](#@GlobalScope_method_move_toward)\ (\ from\: [float](float.md), to\: [float](float.md), delta\: [float](float.md)\ )</td>
Expand Down Expand Up @@ -535,6 +551,10 @@ There are notable differences when using this API with C#. See the C# difference
<td>[float](float.md)</td>
<td>[remap](#@GlobalScope_method_remap)\ (\ value\: [float](float.md), istart\: [float](float.md), istop\: [float](float.md), ostart\: [float](float.md), ostop\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[float](float.md)</td>
<td>[remap_default](#@GlobalScope_method_remap_default)\ (\ value\: [float](float.md), istart\: [float](float.md), istop\: [float](float.md), ostart\: [float](float.md), ostop\: [float](float.md), default_value\: [float](float.md)\ )</td>
</tr>
<tr>
<td>[int](int.md)</td>
<td>[rid_allocate_id](#@GlobalScope_method_rid_allocate_id)\ (\ )</td>
Expand Down Expand Up @@ -5308,7 +5328,7 @@ This function is faster than using [is_equal_approx()](@GlobalScope.md#@GlobalSc

<!-- classref-method -->

[Variant](Variant.md) **lerp**\ (\ from\: [Variant](Variant.md), to\: [Variant](Variant.md), weight\: [Variant](Variant.md)\ ) [🔗](#@GlobalScope_method_lerp)
[Variant](Variant.md) **lerp**\ (\ from\: [Variant](Variant.md), to\: [Variant](Variant.md), weight\: [float](float.md)\ ) [🔗](#@GlobalScope_method_lerp)

Linearly interpolates between two values by the factor defined in `weight`. To perform interpolation, `weight` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use [clampf()](@GlobalScope.md#@GlobalScope_method_clampf) to limit `weight`.

Expand Down Expand Up @@ -5499,6 +5519,92 @@ Returns the minimum of two [int](int.md) values.
```


<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_monotonic_cubic_interpolate"></a>

<!-- classref-method -->

[float](float.md) **monotonic_cubic_interpolate**\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md)\ ) [🔗](#@GlobalScope_method_monotonic_cubic_interpolate)

Performs monotonic cubic interpolation between `from` and `to`\\

using neighboring values `pre` and `post`.

The interpolation factor `weight` is typically between 0.0 and 1.0.



Unlike [cubic_interpolate()](@GlobalScope.md#@GlobalScope_method_cubic_interpolate), this method preserves monotonicity

by automatically limiting tangents to prevent overshoot between key values.

This makes it suitable for animation tracks and other data where values

should not exceed surrounding keyframes.

<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_monotonic_cubic_interpolate_angle"></a>

<!-- classref-method -->

[float](float.md) **monotonic_cubic_interpolate_angle**\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md)\ ) [🔗](#@GlobalScope_method_monotonic_cubic_interpolate_angle)

Performs monotonic cubic interpolation between angular values, rotating

along the shortest path between `from` and `to`.



The neighboring angles `pre` and `post` are used to compute

shape-preserving tangents while accounting for angle wrapping.

This prevents overshoot while maintaining continuous rotation.

See also [lerp_angle()](@GlobalScope.md#@GlobalScope_method_lerp_angle).

<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_monotonic_cubic_interpolate_angle_in_time"></a>

<!-- classref-method -->

[float](float.md) **monotonic_cubic_interpolate_angle_in_time**\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md), to_t\: [float](float.md), pre_t\: [float](float.md), post_t\: [float](float.md)\ ) [🔗](#@GlobalScope_method_monotonic_cubic_interpolate_angle_in_time)

Time-aware version of [monotonic_cubic_interpolate_angle()](@GlobalScope.md#@GlobalScope_method_monotonic_cubic_interpolate_angle).



The interpolation factor is derived from the provided keyframe times,

allowing unevenly spaced keyframes to influence tangent calculation.

This produces consistent motion when animation keys are not uniformly

distributed in time while still preventing overshoot.

<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_monotonic_cubic_interpolate_in_time"></a>

<!-- classref-method -->

[float](float.md) **monotonic_cubic_interpolate_in_time**\ (\ from\: [float](float.md), to\: [float](float.md), pre\: [float](float.md), post\: [float](float.md), weight\: [float](float.md), to_t\: [float](float.md), pre_t\: [float](float.md), post_t\: [float](float.md)\ ) [🔗](#@GlobalScope_method_monotonic_cubic_interpolate_in_time)

Time-aware version of [monotonic_cubic_interpolate()](@GlobalScope.md#@GlobalScope_method_monotonic_cubic_interpolate).



The interpolation parameter is normalized using the supplied keyframe

times, allowing interpolation to account for non-uniform spacing between

values. Tangents are computed in a way that preserves monotonicity and

prevents overshoot between keyframes.

<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_move_toward"></a>
Expand Down Expand Up @@ -6036,7 +6142,25 @@ Maps a `value` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also [

For complex use cases where multiple ranges are needed, consider using [Curve](Curve.md) or [Gradient](Gradient.md) instead.

\ **Note:** If ``istart == istop``, the return value is undefined (most likely NaN, INF, or -INF).
\ **Note:** If ``istart == istop``, the return value is undefined (most likely NaN, INF, or -INF). See also [remap_default()](@GlobalScope.md#@GlobalScope_method_remap_default).

<hr class="classref-item-separator"/>

<a id="@GlobalScope_method_remap_default"></a>

<!-- classref-method -->

[float](float.md) **remap_default**\ (\ value\: [float](float.md), istart\: [float](float.md), istop\: [float](float.md), ostart\: [float](float.md), ostop\: [float](float.md), default_value\: [float](float.md)\ ) [🔗](#@GlobalScope_method_remap_default)

Maps a `value` from range ``[istart, istop]`` to ``[ostart, ostop]`` and returns `default_value` if [remap()](@GlobalScope.md#@GlobalScope_method_remap) would've returned ``INF`` or ``NAN``. See also [remap()](@GlobalScope.md#@GlobalScope_method_remap), [lerp()](@GlobalScope.md#@GlobalScope_method_lerp) and [inverse_lerp()](@GlobalScope.md#@GlobalScope_method_inverse_lerp). If `value` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use [clamp()](@GlobalScope.md#@GlobalScope_method_clamp) on the result of this function.

```
remap_default(75, 0, 100, -1, 1, 3) # Returns 0.5
remap_default(75, 0, 0, -1, 1, 3) # Returns 3.0
```


For complex use cases where multiple ranges are needed, consider using [Curve](Curve.md) or [Gradient](Gradient.md) instead.

<hr class="classref-item-separator"/>

Expand Down
32 changes: 32 additions & 0 deletions docs/Classes/AimModifier3D.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ The feature is simplified, but instead it is implemented with smooth tracking wi
<td>[Axis](Vector3.md#enum_Vector3_Axis)</td>
<td>[get_primary_rotation_axis](#AimModifier3D_method_get_primary_rotation_axis)\ (\ index\: [int](int.md)\ ) <span class="const">const</span></td>
</tr>
<tr>
<td>[bool](bool.md)</td>
<td>[is_relative](#AimModifier3D_method_is_relative)\ (\ index\: [int](int.md)\ ) <span class="const">const</span></td>
</tr>
<tr>
<td>[bool](bool.md)</td>
<td>[is_using_euler](#AimModifier3D_method_is_using_euler)\ (\ index\: [int](int.md)\ ) <span class="const">const</span></td>
Expand All @@ -69,6 +73,10 @@ The feature is simplified, but instead it is implemented with smooth tracking wi
<td>`void`</td>
<td>[set_primary_rotation_axis](#AimModifier3D_method_set_primary_rotation_axis)\ (\ index\: [int](int.md), axis\: [Axis](Vector3.md#enum_Vector3_Axis)\ )</td>
</tr>
<tr>
<td>`void`</td>
<td>[set_relative](#AimModifier3D_method_set_relative)\ (\ index\: [int](int.md), enabled\: [bool](bool.md)\ )</td>
</tr>
<tr>
<td>`void`</td>
<td>[set_use_euler](#AimModifier3D_method_set_use_euler)\ (\ index\: [int](int.md), enabled\: [bool](bool.md)\ )</td>
Expand Down Expand Up @@ -125,6 +133,16 @@ Returns the axis of the first rotation. It is enabled only if [is_using_euler()]

<hr class="classref-item-separator"/>

<a id="AimModifier3D_method_is_relative"></a>

<!-- classref-method -->

[bool](bool.md) **is_relative**\ (\ index\: [int](int.md)\ ) <span class="const">const</span> [🔗](#AimModifier3D_method_is_relative)

Returns ``true`` if the relative option is enabled in the setting at `index`.

<hr class="classref-item-separator"/>

<a id="AimModifier3D_method_is_using_euler"></a>

<!-- classref-method -->
Expand Down Expand Up @@ -165,6 +183,20 @@ Sets the axis of the first rotation. It is enabled only if [is_using_euler()](Ai

<hr class="classref-item-separator"/>

<a id="AimModifier3D_method_set_relative"></a>

<!-- classref-method -->

`void` **set_relative**\ (\ index\: [int](int.md), enabled\: [bool](bool.md)\ ) [🔗](#AimModifier3D_method_set_relative)

Sets relative option in the setting at `index` to `enabled`.

If sets `enabled` to ``true``, the rotation is applied relative to the pose.

If sets `enabled` to ``false``, the rotation is applied relative to the rest. It means to replace the current pose with the **AimModifier3D**'s result.

<hr class="classref-item-separator"/>

<a id="AimModifier3D_method_set_use_euler"></a>

<!-- classref-method -->
Expand Down
16 changes: 14 additions & 2 deletions docs/Classes/Animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,13 @@ Linear interpolation.<a id="Animation_constant_INTERPOLATION_CUBIC"></a>

[InterpolationType](Animation.md#enum_Animation_InterpolationType) **INTERPOLATION_CUBIC** = `2`

Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [INTERPOLATION_LINEAR](Animation.md#Animation_constant_INTERPOLATION_LINEAR) for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.<a id="Animation_constant_INTERPOLATION_LINEAR_ANGLE"></a>
Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [INTERPOLATION_LINEAR](Animation.md#Animation_constant_INTERPOLATION_LINEAR) for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.<a id="Animation_constant_INTERPOLATION_CUBIC_MONOTONIC"></a>

<!-- classref-enumeration-constant -->

[InterpolationType](Animation.md#enum_Animation_InterpolationType) **INTERPOLATION_CUBIC_MONOTONIC** = `5`

Monotonic Cubic interpolation. This is an alternate version of [INTERPOLATION_CUBIC](Animation.md#Animation_constant_INTERPOLATION_CUBIC) that ensures no overshooting of key points.<a id="Animation_constant_INTERPOLATION_LINEAR_ANGLE"></a>

<!-- classref-enumeration-constant -->

Expand All @@ -520,7 +526,13 @@ Linear interpolation with shortest path rotation.

Cubic interpolation with shortest path rotation.

\ **Note:** The result value is always normalized and may not match the key value.<hr class="classref-item-separator"/>
\ **Note:** The result value is always normalized and may not match the key value.<a id="Animation_constant_INTERPOLATION_CUBIC_MONOTONIC_ANGLE"></a>

<!-- classref-enumeration-constant -->

[InterpolationType](Animation.md#enum_Animation_InterpolationType) **INTERPOLATION_CUBIC_MONOTONIC_ANGLE** = `6`

Monotonic Cubic interpolation with shortest path rotation.<hr class="classref-item-separator"/>

<a id="enum_Animation_UpdateMode"></a>

Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/AudioStreamGeneratorPlayback.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This class is meant to be used with [AudioStreamGenerator](AudioStreamGenerator.

- [Audio Generator Demo](https://godotengine.org/asset-library/asset/2759)

- [Redot 3.2 will get new audio features](https://godotengine.org/article/godot-32-will-get-new-audio-features)
- [Godot 3.2 will get new audio features](https://godotengine.org/article/godot-32-will-get-new-audio-features)

<!-- classref-reftable-group -->

Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/BaseMaterial3D.md
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca

Controls how the object faces the camera.

\ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [GitHub issue #41567](https://github.com/redot-engine/redot-engine/issues/41567) for details.
\ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [GitHub issue #41567](https://github.com/godotengine/godot/issues/41567) for details.

<hr class="classref-item-separator"/>

Expand Down Expand Up @@ -2661,7 +2661,7 @@ If ``true``, flips the mesh's tangent vectors when interpreting the height map.

If ``true``, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values.

This can be enabled for compatibility with some materials authored for Redot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Redot 3.x, in which case [heightmap_flip_texture](BaseMaterial3D.md#BaseMaterial3D_property_heightmap_flip_texture) should remain ``false``.
This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case [heightmap_flip_texture](BaseMaterial3D.md#BaseMaterial3D_property_heightmap_flip_texture) should remain ``false``.

<hr class="classref-item-separator"/>

Expand Down
Loading