Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCruis.In

Posted 02 January 2013 - 02:04 PM

hey there thanks for the reply.

 

here is an actual view, forgive the placeholder art and debug stuff.

 

http://imageshack.us/photo/my-images/39/arcsss.png/

 

So the grey ship is mine. Always centered in the middle of the screen and it can move about the world. Rotate accel etc, but the camera is always fixed top down on it wherever it goes.

 

now if I fly around the green ship, I can get the angle of it from me using atan2.

 

But if I rotate that doesn't get taken into account by atan2. So the enemy ship could be at 60 degree value, and I could rotate my ship (let say I am now stationary) and my aft section will be facing the enemy, yet I would be able to fire, although the enemy isn't in my 'front arc'

 

So checking on the angle of the enemy from your ship using atan2 or anything else i've used and using the value returned it to see if it is inside your front firing arc isn't working out.

 

the firing arc is for my projectiles, not really related to collision


#1Cruis.In

Posted 02 January 2013 - 01:40 PM

hey there thanks for the reply.

 

here is an actual view, forgive the placeholder art and debug stuff.

 

So the grey ship is mine. Always centered in the middle of the screen and it can move about the world. Rotate accel etc, but the camera is always fixed top down on it wherever it goes.

 

now if I fly around the green ship, I can get the angle of it from me using atan2.

 

But if I rotate that doesn't get taken into account by atan2. So the enemy ship could be at 60 degree value, and I could rotate my ship (let say I am now stationary) and my aft section will be facing the enemy, yet I would be able to fire, although the enemy isn't in my 'front arc'

 

So checking on the angle of the enemy from your ship using atan2 or anything else i've used and using the value returned it to see if it is inside your front firing arc isn't working out.

 

the firing arc is for my projectiles, not really related to collision


PARTNERS