More specifically I want the character to rotate a complete 180 when I press the left or right arrow key. But I don't want it to rotate again if I press the same key in sequence. Example: Character is facing Forward. I Press Left, the model rotates 180 left. I press Left again nothing happens because the model is already rotated (Would be perfect). Ive searched all over web but can't really figure this one out :/ Heres my script
import bge
def main():
cont = bge.logic.getCurrentController()
player = cont.owner
keyboard = bge.logic.keyboard
if bge.logic.KX_INPUT_JUST_ACTIVATED == keyboard.events[bge.events.LEFTARROWKEY]:
player.applyRotation((0,1.57,0), True)
Any help will be appreciated thank you!