- Home /
Calculate Vector3 for rotation or just change pivot;
So my problem is with defining Vector3. Im using iTween.RotateBy and i need to set a Vector3 to rotate always in directions that i marked on printscreen and always by 90 degrees. Hope PrtScr is showing very well my problem.
Anyone have idea how to define a Vector3 of red and green arrows from 1 photo? Or how to change pivot.
P.S Before i was using cube.transform.up and cube.transform.up*1 -for red arrows / cube.transform.right and cube.transform.right*-1 -for green arrows
I'm totally not understanding your question. You're saying Vector3, but you're talking about rotations. So why aren't you using Quaterions? I guess you can use Vector3's, but ow.
Also, are you basically trying to recreate the little transform cube from the Scene editor, or is that square 2D and I'm misinterpreting your drawing?
its 3d cube. iTween.RotateBy is using Vector3 for seting direction and angle of rotate.
RotateBy "$$anonymous$$ultiplies supplied values by 360 and rotates a GameObject by calculated amount over time.
RotateBy(GameObject target, Vector3 amount, float time)"
http://itween.pixelplacement.com/documentation.php
with quaternions are same problem with axis changing position.
Btw camera is rotated by 45 degrees thats why axis looks like rotated by 45 degrees.
Your answer
Follow this Question
Related Questions
How can I rotate a vector direction around an arbitrary axis? 0 Answers
How can I fix the local axis of pivots from a purchased asset? 1 Answer
Character Controller Movement - Different speeds on different axis 1 Answer
Inverse Rotation in Child Object 1 Answer
How would I rotate an object relative to another without parenting? 2 Answers