@koogs
Because the original parameters are being calculated based on movement in order to make the movement of the box look realistic, (like it is rolling.)
But when, for example rotateX gets above 90 degrees and the box decides to move left and a rotation occurs along the Y axis as a result, it now looks as if it is a rotating along the Z axis.
My plan is to always map rotations to be 270-90 so that the rotations remain consistent
I am trying to leave context out of this discussion though. There must be a solution to the specific problem that I laid forth.
What it comes down to is just the fact that I need some way to rotate a box in multiple dimensions simultaneously.
If you do rotateY(radians(n)); then rotateX(radians(z)); It works intuitively up to 45 degrees in both directions, but after that it stops working correctly.
If I calculate that I need to rotate, say 60 degrees right along the Y axis and 30 degrees up along the X because there are forces pushing the box up and right simultaneously, then I need a way to do that, I cant just plug those numbers into rotateY and rotateX though
Answers
why? you don't say.
@koogs Because the original parameters are being calculated based on movement in order to make the movement of the box look realistic, (like it is rolling.)
But when, for example rotateX gets above 90 degrees and the box decides to move left and a rotation occurs along the Y axis as a result, it now looks as if it is a rotating along the Z axis.
My plan is to always map rotations to be 270-90 so that the rotations remain consistent
I am trying to leave context out of this discussion though. There must be a solution to the specific problem that I laid forth.
still not clear to me, sorry.
but my point is that maybe you're trying to solve something that doesn't NEED solving.
What it comes down to is just the fact that I need some way to rotate a box in multiple dimensions simultaneously.
If you do
rotateY(radians(n));
thenrotateX(radians(z));
It works intuitively up to 45 degrees in both directions, but after that it stops working correctly.If I calculate that I need to rotate, say 60 degrees right along the Y axis and 30 degrees up along the X because there are forces pushing the box up and right simultaneously, then I need a way to do that, I cant just plug those numbers into rotateY and rotateX though
@koogs please see my new question "formula to simulate 2D rotation"