Rotations reprise

Sploreg said:
This is a good neck exercise by the way.

Bruce Lee kills people by just telling them that ^^ "Now try tilting to the side first, then put your chin down" -- "crack!" xD

omg…omg…epicness!!!

yes, i put the mult backwards and it worked like a charm! (how do charms work by the way…anyway, it’s epic cause it works!!!)



all the frustration is sooo gone the relief should be taxed…



thanks, so if anyone was watching this post



Vector3f vector = new Vector3f();

if (sphereDirection == 90 || sphereDirection == 270)

vector = Vector3f.UNIT_Z;

else

vector = Vector3f.UNIT_X;



Quaternion rotate = new Quaternion().fromAngleAxis( sphereAxisX+sphereAxisZ, vector);

RainbowSphere.setLocalRotation( rotate.mult(RainbowSphere.getLocalRotation()));



thanks for sticking with the problem till the end!!



It looks freakishly simple, but it’s not…

anything u want from me, like teaching ppl stuff in two years…i can do that for u XD thanks again

1 Like

Easy way to get an up-vector of any rotation:

[java]Vector3f vec = new Vector3f(Vector3f.UNIT_Y);

quat.multLocal(vec);

[/java]

…now vec is the correct up-vector for that quaternion and you can lookAt etc to your hearts content.