Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | LionRocker221 |
Hi there, i’m trying to make a 3d third person game, and I need help rotating the character. when I want to go from looking left, to let say up, i want it to set to that rotation. all i can find is just moving it 180 degrees in a certain way, so that it would depend on what direction you would previously be at.
in other words;
starting direction = left
goal = up
what i need to do then is turn the object 90 degrees right.
but what if the starting direction was back?
starting direction = back
goal up
what .i need to do is turn the object 180 degrees.
so its clear that i need to change the amount of degrees turned in order to get the desired result
is there a way, like a function, so that each time, no matter the direction, it will set the rotation to a number of degrees?
thanks