S
Skyler Clark
Guest
So I’m making a top down game.
Right now the player is just a cube, (there’s the invisible cube for the actual player input, and another visible cube drawn on top of it for the animation so it can spin) and the front of the cube spins around and looks wherever the mouse is.
I’m going to be adding a sprite with an actual character soon, so instead of having the sprite spin in a full 360 looking at the mouse all of the time, I want the sprite to only have 4 directions it can look; up, down, left, and right. I can’t think of how to go about this. It would mean a lot if anyone could send me some code or suggestions. Thanks!
Right now the player is just a cube, (there’s the invisible cube for the actual player input, and another visible cube drawn on top of it for the animation so it can spin) and the front of the cube spins around and looks wherever the mouse is.
I’m going to be adding a sprite with an actual character soon, so instead of having the sprite spin in a full 360 looking at the mouse all of the time, I want the sprite to only have 4 directions it can look; up, down, left, and right. I can’t think of how to go about this. It would mean a lot if anyone could send me some code or suggestions. Thanks!