So basically if i have a vector, and i’d like to rotate 90 degrees towards another vector, i’m trying to figure out how to get that vector, I know the axis i’m rotating around.
(cross(up,known vector))
I know the angle i’m rotating(90 degrees)
I can do a rotatearound(axis,angle)
but i dont actually want to move to it, i just want to know what it is.
A general direction so i can move up or down along that plane.
It’s odd but there doesnt seem to a vector3.rotate that returns a vector.
hey unitygems actually helped me do the math easy. I was aware you could get transform.right but i wasn’t working with a transform i was working with a normal returned from a I didn’t realize you could actually just set one of those values like
transform.forward = normal. and unity just set the rest for you. I’m not sure yet if i can set the object i want to move that way or if it’ll rotate wierd but if not i can create an empty gameobject to set forward towards and use that empty game object to get the left/right and up/down vectors.
Too helpful that was, I mean i knew there was a way to rotate the vector 90 degrees up and stuff and get the local up, but I wasn’t sure how to do it. Luckily whoever wrote unity knows. 