- Home /
The question is answered, right answer was accepted
What 's the different between vector2 and vector3 assigned by Vector2.lerp?
When I coded different form of assigned transform.right, I found I got different result.
Vector2 vecRes = Vector2.Lerp(transRight, dirNorm, myManager.rotationLerp);
transform.right = vecRes;
has the right result,but
transform.right = Vector2.Lerp(transRight, dirNorm, myManager.rotationLerp);
has the wrong result.
Should I assign a new Vector2 var then to assign the new var to transform.right? Or should I have to (Vector2)Vector2.lerp() first?
Edit: I should not use Vector2.lerp to process rotation then assigned to transform.right. transform.right will use quaterion * vector3.right get the result. I should use Quaternion.Lerp() to get rotation then set to transform.rotation.
Follow this Question
Related Questions
What is Mono? Is it a compiler? A language? Or what? 3 Answers
adding localization 1 Answer
how to transfer data to unity efficiently 1 Answer
Change InputField decimal mark 1 Answer
NDK vs JDK 0 Answers