hey. I'm trying to make a platformer in which the entire world is supposed to move around the player as well as the player being in control of a character.
right now I'm battling with the rotation function in actionscript.
here's my code:
function rotateStage(e:Event){
if(leftKeyPush && rightKeyPush) return;
if(leftKeyPush) World.rotation = 90;
if(rightKeyPush) World.rotation = -90;
}
'leftKeyPush' and 'rightKeyPush' are what detect if the arrow keys are being pressed
My intended function is that when you hit left, the world turns 90 degrees to the left, and vice versa. but it's not doing it, and I'm not sure why
there are no compiler errors (yay. -.-) and the keys have been assigned correctly
thanks for reading