summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--doc/classes/InterpolatedCamera.xml7
-rw-r--r--modules/mono/glue/cs_files/Mathf.cs12
3 files changed, 20 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6bb07a8c44..8ad738c23d 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Before being open sourced in February 2014, Godot had been developed by Juan
Linietsky and Ariel Manzur (both still maintaining the project) for several
years as an in-house engine, used to publish several work-for-hire titles.
-![Screenshot of a 3D scene in Godot Engine](http://download.tuxfamily.org/godotengine/media/screenshots/editor_3d_fracteed.jpg)
+![Screenshot of a 3D scene in Godot Engine](https://download.tuxfamily.org/godotengine/media/screenshots/editor_3d_fracteed.jpg)
### Getting the engine
diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml
index 9ee06b9d4f..b4047f450d 100644
--- a/doc/classes/InterpolatedCamera.xml
+++ b/doc/classes/InterpolatedCamera.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.1">
<brief_description>
+ Camera which moves toward another node
</brief_description>
<description>
+ InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
+ If it is not [member enabled], or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
</description>
<tutorials>
</tutorials>
@@ -15,15 +18,19 @@
<argument index="0" name="target" type="Object">
</argument>
<description>
+ Set the node to move toward.
</description>
</method>
</methods>
<members>
<member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled">
+ If [code]true[/code], and a target is set, the camera will move automatically.
</member>
<member name="speed" type="float" setter="set_speed" getter="get_speed">
+ How quickly the camera moves.
</member>
<member name="target" type="NodePath" setter="set_target_path" getter="get_target_path">
+ The target's [NodePath].
</member>
</members>
<constants>
diff --git a/modules/mono/glue/cs_files/Mathf.cs b/modules/mono/glue/cs_files/Mathf.cs
index 8b9c264d0d..adbcc855ef 100644
--- a/modules/mono/glue/cs_files/Mathf.cs
+++ b/modules/mono/glue/cs_files/Mathf.cs
@@ -257,5 +257,17 @@ namespace Godot
{
return (real_t)Math.Tanh(s);
}
+
+ public static int Wrap(int val, int min, int max)
+ {
+ int rng = max - min;
+ return min + ((((val - min) % rng) + rng) % rng);
+ }
+
+ public static real_t Wrap(real_t val, real_t min, real_t max)
+ {
+ real_t rng = max - min;
+ return min + (val - min) - (rng * Floor((val - min) / rng));
+ }
}
}