how to code 'Scramble' missiles

BlitzMax Forums/BlitzMax Beginners Area/how to code 'Scramble' missiles

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

A 2D cone?

You need to find the angle one point is at (the player) relative to another point (the small end of the cone) and then detrmine if it is between angles (lookdirection-conefov/2) and (lookdirection+conefov/2).

I'm sure there's code in the code archives to find the angle of one point relative to the other. I think it involves Atan or Atan2.