Hi, I have a character in my game, that when I have the code:
player1 actually looks the exact opposite direction of player2. Is there a way to either change the orientation of my character, so his front is actually the front, or is there a way to make the self.lookAt() rotate by 180 degrees. I’ve tried this code, which didn’t work, and i’m not sure why.
if (self.keyMap["select-target"]!=0): player2_XCoord = self.player2.getX() player2_YCoord = self.player2.getY() player2_OppositeXCoord = player2_XCoord * -1 player2_OppositeYCoord = player2_YCoord * -1 self.player1.lookAt(player2_OppositeXCoord, player2_OppositeYCoord, 0)
This has the same effect of the player1 facing the exact opposite direction of player2, even though it should have inverted the x,y coordinates. Any ideas?