And also you would lose the version control history of that file (which you mentioned would not be a problem for you but may be for others).

Unity Unity comes up with good SVN integration in their editor, it is simply safer to just move the original asset (and it’s accompanying .meta file) to the new location using the **svn move** command (or using an SVN client such as TortoiseSVN) and let the Unity editor figure out that the file has been moved.

This article was written for people with a basic understanding of trigonometry and linear algebra. If you don’t know how I transformed the vector [math](0,1,0)[/math] to [math](0, 0, 1)[/math] then you probably don’t understand the trigonometry (sine, cosine functions) and matrix multiplication which is shown there. You should study linear algebra before you read this article as linear algebra is the basis for linear and affine transformations in 3D.

]]>Thanks

]]>I know this post is kinda old, but I still would be very interessted in your source. Is it possible to download it somewhere?

Best Regards

Ovski

Then after, you come up with the result 0,0,1 without further explanation on how..

If I understood what you were talking about I wouldnt have to read this article..and when I dont understand it I cant understand it..see my point ?

]]>One question though, about moving/renaming files:

“If you accidently move/rename files in the Project View in the Unity editor, you will break the link to the file as known by the Subversion system”

Now, if I understand SVN correctly, If I rename/move files in the unity project viewer then committed my changes SVN would delete the old files and upload new files as if they were new and not just moved/renamed, right? Are there any problems with this? I can understand that the old revision data would be gone (since it’s a new file, technically) but is there anything else to be concerned about?

You are right about the fact that [math]\mathbf{i}^2=\mathbf{j}^2=\mathbf{k}^2=-1[/math] as is stated in the section titled Quaternions.

Maybe if I write the product rule like this:

[math]\begin{array}{rcl}q_a & = & [s_a,\mathbf{a}] \\ q_b & = & [s_b,\mathbf{b}] \\ q_{a}q_{b} & = & [s_{a},\mathbf{a}][s_{b},\mathbf{b}] \\ & = & (s_{a}+x_{a}i+y_{a}j+z_{a}k)(s_{b}+x_{b}i+y_{b}j+z_{b}k) \\ & = & (s_{a}s_{b} + x_{a}x_{b}i^{2} + y_{a}y_{b}j^{2} + z_{a}z_{b}k^{2}) \\ & & +(s_{a}x_{b}+s_{b}x{a}+y_{a}z_{b}-y_{b}z_{a})i \\ & & +(s_{a}y_{b}+s_{b}y_{a}+z_{a}x_{b}-z_{b}x_{a})j \\ & & +(s_{a}z_{b}+s_{b}z_{a}+x_{a}y_{b}-x_{b}y_{a})k\end{array}[/math]

And we can write the dot product of the vector parts of the two quaternions as:

[math]\begin{array}{rcl}\mathbf{a}\cdot\mathbf{b} & = & x_{a}x_{b}\mathbf{i}^{2}+y_{a}y_{b}\mathbf{j}^2+z_{a}z_{b}\mathbf{k}^{2} \\ & = & (-1)x_{a}x_{b} + (-1)y_{a}y_{b} + (-1)z_{a}z_{b} \\ & = & -(x_{a}x_{b} + y_{a}y_{b} + z_{a}z_{b})\end{array}[/math]

Which we can substitute back into the original equation:

[math]\begin{array}{rcl}[s_{a},\mathbf{a}][s_{b},\mathbf{b}] & = & (s_{a}s_{b}-\mathbf{a}\cdot\mathbf{b}) \\ & & +(s_{a}x_{b}+s_{b}x{a}+y_{a}z_{b}-y_{b}z_{a})i \\ & & +(s_{a}y_{b}+s_{b}y_{a}+z_{a}x_{b}-z_{b}x_{a})j \\ & & +(s_{a}z_{b}+s_{b}z_{a}+x_{a}y_{b}-x_{b}y_{a})k\end{array}[/math]

So we are not adding any extra negatives, we are just factoring out the [math]\mathbf{i}^2=\mathbf{j}^2=\mathbf{k}^2=-1[/math] from the dot-product to get the real part of the quaternion product.

Does this make it more clear?

]]>