summaryrefslogtreecommitdiffstats
path: root/doc/classes/Basis.xml
diff options
context:
space:
mode:
authorMart Jõgi <mart3323@gmail.com>2024-05-19 13:15:28 +0300
committerRémi Verschelde <rverschelde@gmail.com>2024-06-10 13:31:29 +0200
commit771f52e477b673e6764700f5dc974059ca371f9b (patch)
treeb5fa58aef116f54fb9b4549487a7d70cda73bdc0 /doc/classes/Basis.xml
parent32eba1ee17555fbc4f4d348a568b6d9d391de9a5 (diff)
downloadredot-engine-771f52e477b673e6764700f5dc974059ca371f9b.tar.gz
Fix example for Basis * Vector3 in documentation
Fixes: godotengine/godot-docs#9394
Diffstat (limited to 'doc/classes/Basis.xml')
-rw-r--r--doc/classes/Basis.xml10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 338d9523fa..41bda1033d 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -444,12 +444,14 @@
Transforms (multiplies) the [param right] vector by this basis, returning a [Vector3].
[codeblocks]
[gdscript]
- var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, 1, 1), Vector3(0, 2, 5))
- print(my_basis * Vector3(1, 2, 3)) # Prints (7, 3, 16)
+ # Basis that swaps the X/Z axes and doubles the scale.
+ var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))
+ print(my_basis * Vector3(1, 2, 3)) # Prints (4, 2, 6)
[/gdscript]
[csharp]
- var myBasis = new Basis(new Vector3(1, 1, 1), new Vector3(1, 1, 1), new Vector3(0, 2, 5));
- GD.Print(my_basis * new Vector3(1, 2, 3)); // Prints (7, 3, 16)
+ // Basis that swaps the X/Z axes and doubles the scale.
+ var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new Vector3(0, 0, 2));
+ GD.Print(myBasis * new Vector3(1, 2, 3)); // Prints (4, 2, 6)
[/csharp]
[/codeblocks]
</description>