Comments and answers for "How do I rotate on World Axes with Quaternion.Slerp?"
http://answers.unity.com/questions/41964/how-do-i-rotate-on-world-axes-with-quaternionslerp.html
The latest comments and answers for the question "How do I rotate on World Axes with Quaternion.Slerp?"Comment by toum on toum's answer
http://answers.unity.com/comments/453955/view.html
Could you explain what is the difference between these 2 orders?Fri, 10 May 2013 20:58:40 GMTtoumComment by cregox on cregox's answer
http://answers.unity.com/comments/187501/view.html
if you need some help, you should add this as a question. and if you wanted to call attention from ppl in this " thread ", then you could post comments. but above all, try to make your question clear. I can't understand what you're asking.Sat, 19 Nov 2011 20:06:04 GMTcregoxAnswer by Kalu
http://answers.unity.com/answers/187485/view.html
After lots of testing, the pins remain in place, but following the combination of rotation is complete, the cube undergoes some rotation along the Y axis that is manipulating the "wheel" of rotation Z or Y. And I can not understand where the problem.
Here is the code used ..
void Update () {
if(switchControl == true && curTarget != null){
if(curTarget.name == "RedR" || curTarget.name == "GreenR" || curTarget.name == "BlueR"){
Quaternion curPlanchTargetRot = Quaternion.Euler(angles);
curPlanche.transform.rotation = Quaternion.Slerp(curPlanche.transform.rotation, curPlanchTargetRot, 10f*Time.deltaTime);
}
}
void onMouseRotateDrag ()
{
float posInitX = initMousePosX;//position du curseur au moment du clic
float posInitY = initMousePosY;
float posCurX = Input.mousePosition.x;//position du curseur pendant le drag
float posCurY = Input.mousePosition.y;
differenceX = Mathf.Floor((posCurX-posInitX)/150);
differenceY = Mathf.Floor((posCurY-posInitY)/150);
curDifference = differenceX;
if(Mathf.Abs(curDifference)<Mathf.Abs(differenceY)){//floor() valeur inf et ceil() valeur sup
// curDifference = differenceY;
}
if(curDifference != curApplyDifference){
if(curTarget.name == "RedR"){ // axe X
angles.x = ((-curDifference*90) % 360);
curApplyDifference = curDifference;
}else if(curTarget.name == "GreenR"){ // axe Y
angles.y = ((-curDifference*90) % 360);
curApplyDifference = curDifference;
}else if(curTarget.name == "BlueR"){ // axe Z
angles.z = ((-curDifference*90) % 360);
curApplyDifference = curDifference;
}
posInitX = Input.mousePosition.x;
posInitY = Input.mousePosition.y;
}
}
I need some help ... It's been three days I'm looking without much successSat, 19 Nov 2011 17:44:58 GMTKaluComment by cregox
http://answers.unity.com/comments/180217/view.html
related: http://answers.unity3d.com/questions/171380/camera-relative-free-orbit.htmlWed, 26 Oct 2011 16:33:28 GMTcregoxComment by Heratitan on Heratitan's answer
http://answers.unity.com/comments/95494/view.html
Thank You! This was much simpler than I thought it would be.Sun, 09 Jan 2011 04:36:27 GMTHeratitanAnswer by Jesse Anders
http://answers.unity.com/answers/41972/view.html
<p>Try changing this:</p>
<pre><code>var endRotation = thisTransform.rotation * Quaternion.Euler(degrees);
</code></pre>
<p>To this:</p>
<pre><code>var endRotation = Quaternion.Euler(degrees) * thisTransform.rotation;
</code></pre>Sun, 09 Jan 2011 04:05:39 GMTJesse Anders