Suppose you have a vector 0, 0, 1
.
How can you rotate this on the Y axis?, say, by 45 degrees. So you end up with 0.5, 0, 0.5
.
Suppose you have a vector 0, 0, 1
.
How can you rotate this on the Y axis?, say, by 45 degrees. So you end up with 0.5, 0, 0.5
.
Quaternion rot = new Quaternion().fromAngles(0, 45 * FastMath.DEG_TO_RAD, 0);
Vector3f v = rot.mult(new Vector3f(0, 0, 1));
Like that?
Yeah I figured it out, forgot to edit the post.
I fed it some wrong inputs. I had to take the radians and -= radians % FastMath.PI cause, you can’t feed it any value greater than PI right?
Sure you can.
Huh… ok xD