Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 645

Testing containment of a detected ship in a sensor's detection zone

$
0
0
I've been trying to test whether a ship detected by a sensor is actually contained within the sensor's detection zone or just intersecting, but I can't seem to get it to work right for some reason.

Code:
public string ToString(Vector3D vector)
{
  return string.Format("({0}, {1}, {2})", Math.Round(vector.X, 3), Math.Round(vector.Y, 3), Math.Round(vector.Z, 3));
}

public void Main(string argument)
{
  if(argument.ToLower() == "clear")
  {

  }
  else
  {
  var sensor =...
Testing containment of a detected ship in a sensor's detection zone

Viewing all articles
Browse latest Browse all 645

Trending Articles