Skip to main content

Radar

The radar allows you to detect objects in the direction of the arrow on the texture. The radars detection is based on the surface area of the object, the distance it is away from you and your scan angle. If you have a smaller scan range in general, you will be able to see further and you will be able to detect smaller bodies. A larger scan range will result in the opposite.


Structure

Target

A target is an object detected from the radar.

Fields:

  • position [ Vec3 ] The position of the target.
  • surfaceArea [ number ] The total surface area that the radar can see

Functions

getTargets

Radar.getTargets()

Gets all the targets it has detected.

Returns:


setVerticalScanAngle

Radar.setVerticalScanAngle( angle )

Sets its vertical angle from 10 to 90.

Arguments:

  • angle [ number ] The angle to set.

setHorizontalScanAngle

Radar.setHorizontalScanAngle( angle )

Sets its horizontal angle from 10 to 90.

Arguments:

  • angle [ number ] The angle to set.