|
Hello, here I'm stuck with quaternion usage (I know I'm not alone and that's reassuring... a bit:)). I have a cube. I want to make this cube rotates from 90 degrees on X axis or Y axis in worldspace. Here is the code I use in the cube script : As I understand it, using Any idea?
(comments are locked)
|
|
You are over complicating it :) The transform.right etc is messing it up, because it is changing too and you are accounting for the current rotation by using it in your calculation. ...you again :) Thank you for this quick answer, however it does not work. In fact using this VISUALLY gives me rotation on: Y,Z,X,Z... etc.
Jun 23 '12 at 10:10 AM
lvictorino
Ugh - bloody quaternion rotations - sorry you need to do this:
Jun 23 '12 at 10:11 AM
whydoidoit
Always feels unnatural to me :)
Jun 23 '12 at 10:12 AM
whydoidoit
Damn! I didn't know that order was important in Quaternion maths. Thank you A LOT.
Jun 23 '12 at 10:14 AM
lvictorino
you need to read up on Peano's axioms, Victor
Jun 23 '12 at 10:55 AM
Fattie
(comments are locked)
|

Victor ... did you check out the LOOKAT command in Unity? it solves many problems! check it out