Comments and answers for "Is it possible to translate an object diagonally at a specific angle?"
http://answers.unity.com/questions/788043/is-it-possible-to-translate-an-object-diagonally-a.html
The latest comments and answers for the question "Is it possible to translate an object diagonally at a specific angle?"Comment by nabilfahd on nabilfahd's answer
http://answers.unity.com/comments/1557703/view.html
i've been looking for this! thank you!Fri, 28 Sep 2018 13:59:55 GMTnabilfahdComment by SarfaraazAlladin on SarfaraazAlladin's answer
http://answers.unity.com/comments/788414/view.html
This is exactly what I was looking for, and it worked like a charm. thank you!Wed, 10 Sep 2014 14:21:52 GMTSarfaraazAlladinAnswer by Mubanga
http://answers.unity.com/answers/788136/view.html
You can definitely translate an angle in to a vector 3 using `Mathf.sin` or tan or cos whatever you need, it is just basic geometry.Wed, 10 Sep 2014 03:26:58 GMTMubangaAnswer by Owen-Reynolds
http://answers.unity.com/answers/788158/view.html
`transform.Translate` is mostly a shortcut to easily more _your_ forward, or left or right. Once you start doing fancy stuff, it seems easier to change position directly.
To get a line going 30 degrees from right, for example:
Vector3 A = Quaternion.Euler(0,30,0) * Vector3.right;
The first part assumes you have a top view. It rotates 30 degrees around Y. For a front view, use Z, the 3rd slot (or trial and error.)
Then, to move, just add:
transform.position += A;
Can multiply A by speed, or whatever.
If you want to move 30 degrees from your current facing, the math is the same, but substitute "forward from me" for right:
Vector3 A = Quaternion.Euler(0,30,0)*transform.forward;Wed, 10 Sep 2014 03:11:22 GMTOwen-Reynolds