Can't get rotation correct.
Jaysta
Member Posts: 18
Hi,
Im having trouble with rotation. Image is facing right.
I have an enemy tank and friendly tank with with position X,Y constrained to ER Pos X,Y and friendly tank X,Y.
Now, enemy tank comes randomly from bottom of screen, and friendly tank spawns from tank factory any where on screen where user places the tank factory.
I have friendly tank set to move to: ER Pos X,Y and self.rotation constrained to vectorToAngle( game.ER Pos X , game.ER Pos Y ) but it does not rotate to face enemy tank.
Is there something I am missing?
Screen is 960x640, tracking area is half the size, so user can move around the world.
Thanks.
Im having trouble with rotation. Image is facing right.
I have an enemy tank and friendly tank with with position X,Y constrained to ER Pos X,Y and friendly tank X,Y.
Now, enemy tank comes randomly from bottom of screen, and friendly tank spawns from tank factory any where on screen where user places the tank factory.
I have friendly tank set to move to: ER Pos X,Y and self.rotation constrained to vectorToAngle( game.ER Pos X , game.ER Pos Y ) but it does not rotate to face enemy tank.
Is there something I am missing?
Screen is 960x640, tracking area is half the size, so user can move around the world.
Thanks.
Comments
Darren.
Darren.