Rotating the cube by euler engles, carries the other axes together. Flávio San Flávio Posts: 24 Threads: 8 Joined: Nov 2015   23 Nov 2015, 6:04 (This post was last modified: 27 Nov 2015, 22:49 by Flávio San.) I implemented some tricks in the "Tutorial #02: Color Cube" and I noticed something unexpected. My body for void App::ColorCubeLogic::OnProcessTick(const Logic::IState* state) is now: Code:```void App::ColorCubeLogic::OnProcessTick(const Logic::IState* state) { static Double angleX = 0; static Double angleY = Math::HALF_PI; static Double spinSpeed = 0.007; angleX += spinSpeed; angleX = Math::Fmod(angleX, Math::TWO_PI); angleY = Math::Fmod(angleY, Math::TWO_PI); mCubeTransform->SetRotation(angleX, angleY, 0); state->SetUserDebugMessage(Util::DoubleToString(spinSpeed) + " -> " + Util::DoubleToString(angleX) + " / " + Util::DoubleToString(angleY) + "\n"); }```I noticed that my cube is spinning in the axis-Z unlike axis-X. This only happens when the angleY is in (HALF_PI) or (PI + HALF_PI). If this is true so, how I do to not carry in rotation the other axes together? ✠ nnDnn ✠ The peace of Christ! ✠ nnDnn ✠ « Next Oldest | Next Newest »

 Messages In This Thread Rotating the cube by euler engles, carries the other axes together. - by Flávio San - 23 Nov 2015, 6:04 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 23 Nov 2015, 8:39 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 23 Nov 2015, 12:26 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 23 Nov 2015, 17:46 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 23 Nov 2015, 18:41 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 23 Nov 2015, 19:33 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 23 Nov 2015, 20:01 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 23 Nov 2015, 20:41 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 23 Nov 2015, 21:30 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 23 Nov 2015, 21:37 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 24 Nov 2015, 1:18 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 25 Nov 2015, 15:34 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 25 Nov 2015, 16:32 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 25 Nov 2015, 19:17 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 25 Nov 2015, 19:36 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 25 Nov 2015, 20:48 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 25 Nov 2015, 23:19 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 27 Nov 2015, 17:28 RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 30 Nov 2015, 12:09 RE: Rotating the cube axis and not changing the cube angle - by Flávio San - 30 Nov 2015, 16:18

Forum Jump: