- Home /
2D sprite rotating in 3D plane
Hey guys! I'm kinda new in this so I'm trying to make a 2D sprite to rotate in angles of 45º they way the character is facing. I made this .gif to explain better my idea
http://zippy.gfycat.com/UnsteadyMatureGrunion.webm
(yea, I took that background image from another game, but its only to show that, im not actually using it)
What I'm trying to do is that the character can move in total of 6 directions: Left, Right, Right at 45º, Right at -45º, Left at 135º, Left at -135º.
I've been thinking maybe add only one force to go forwards or backwards (with A or D key) and achieve the direction by rotating the Y axis the degrees I want (by pressing for example, W+D to go Right at 45º).
I cant find any tutorial that can explain me this since mostly is about 2d or fps, and if I find somethig about rotation its rotation/second and I want to get the rotation fixed at 45º if im pressing W+D and not that it keeps rotating.
Anyone here wants to help me out with this?