summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-05-19 13:28:50 +0200
committerkleonc <9283098+kleonc@users.noreply.github.com>2023-06-14 14:54:00 +0200
commit77b8e0fcb7cfcdabed7e7217caedf69c049c7a3e (patch)
tree431c7cad0738d660793e0f4a703c7fe56dd24621 /doc
parent01453ab7f3e6940ecd611d63d675a484b2f55cb4 (diff)
downloadredot-engine-77b8e0fcb7cfcdabed7e7217caedf69c049c7a3e.tar.gz
Allow setting negative WorldBoundaryShape2D.distance through the editor
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Plane.xml6
-rw-r--r--doc/classes/WorldBoundaryShape2D.xml5
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index fa29244c2a..0b147934d4 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -138,7 +138,7 @@
<method name="normalized" qualifiers="const">
<return type="Plane" />
<description>
- Returns a copy of the plane, normalized.
+ Returns a copy of the plane, with normalized [member normal] (so it's a unit vector). Returns [code]Plane(0, 0, 0, 0)[/code] if [member normal] can't be normalized (it has zero length).
</description>
</method>
<method name="project" qualifiers="const">
@@ -151,11 +151,11 @@
</methods>
<members>
<member name="d" type="float" setter="" getter="" default="0.0">
- The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative.
+ The distance from the origin to the plane, expressed in terms of [member normal] (according to its direction and magnitude). Actual absolute distance from the origin to the plane can be calculated as [code]abs(d) / normal.length()[/code] (if [member normal] has zero length then this [Plane] does not represent a valid plane).
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
</member>
<member name="normal" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
- The normal of the plane, which must be a unit vector.
+ The normal of the plane, typically a unit vector. Shouldn't be a zero vector as [Plane] with such [member normal] does not represent a valid plane.
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property.
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/WorldBoundaryShape2D.xml b/doc/classes/WorldBoundaryShape2D.xml
index 4ee4b2551c..9de10a531f 100644
--- a/doc/classes/WorldBoundaryShape2D.xml
+++ b/doc/classes/WorldBoundaryShape2D.xml
@@ -10,10 +10,11 @@
</tutorials>
<members>
<member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
- The line's distance from the origin.
+ The distance from the origin to the line, expressed in terms of [member normal] (according to its direction and magnitude). Actual absolute distance from the origin to the line can be calculated as [code]abs(distance) / normal.length()[/code].
+ In the scalar equation of the line [code]ax + by = d[/code], this is [code]d[/code], while the [code](a, b)[/code] coordinates are represented by the [member normal] property.
</member>
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)">
- The line's normal. Defaults to [code]Vector2.UP[/code].
+ The line's normal, typically a unit vector. Its direction indicates the non-colliding half-plane. Can be of any length but zero. Defaults to [code]Vector2.UP[/code].
</member>
</members>
</class>