From 631c0fa77b979c14f3238524b5c2cabfb77ef2d0 Mon Sep 17 00:00:00 2001 From: cutealien Date: Tue, 26 Sep 2023 21:31:35 +0000 Subject: [PATCH] Add warning about rotateXZBy using right handed rotation Rest of Irrlicht is using left-handed rotatations. But 2d vector rotations all uses ccw which is kinda the same direction as this one if you consider those as rotations around Y, so I guess that was maybe the reason back then. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6536 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/vector3d.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/vector3d.h b/include/vector3d.h index 42ab86ab..d58c6cc7 100644 --- a/include/vector3d.h +++ b/include/vector3d.h @@ -207,7 +207,10 @@ namespace core } //! Rotates the vector by a specified number of degrees around the Y axis and the specified center. - /** \param degrees Number of degrees to rotate around the Y axis. + /** CAREFUL: For historical reasons rotateXZBy uses a right-handed rotation + (maybe to make it more similar to the 2D vector rotations which are counterclockwise). + To have this work the same way as rest of Irrlicht (nodes, matrices, other rotateBy functions) pass -1*degrees in here. + \param degrees Number of degrees to rotate around the Y axis. \param center The center of the rotation. */ void rotateXZBy(f64 degrees, const vector3d& center=vector3d()) {