Spot

Home > Support > Technical questions > DCS: World Scripting Engine > Part 2 > Classes > Spot

Spot

Spot

Represents a spot from laser or IR-pointer. Final class.

Types

Spot.Category enum that stores spot categories.

 Spot.Category = {
   INFRA_RED,
   LASER
 }

Static functions

 Spot function Spot.createInfraRed(Object source, Vec3 localPoint = nil, Vec3 point)

creates laser ray from the object to the given point.

source

  • The object as the IR beam source.

localPoint

  • The point in the object reference frame where the IR beam is radiated from. May be nil.

point

  • The spot point - end point of the IR beam.
 Spot function Spot.createInfraRed(Object source, Vec3 localPoint = nil, Vec3 point, number laserCode)

creates laser ray from the object to the given point.

source

  • The object as the laser beam source.

localPoint

  • The point in the object reference frame where the laser beam is radiated from. May be nil.

point

  • The spot point - end point of the laser beam.

laserCode

  • The code that is used by laser designator.

Member functions

 function Spot.destroy(Spot self)

Destroys the spot.

 Spot.Category function Spot.getCategory(Spot self)

Returns category of the spot.

 Vec3 function Spot.getPoint(Spot self)

Returns position of the spot, end of the beam.

 number function Spot.getCode(Spot self)

Returns laser code.

 function Spot.setPoint(Spot self, Vec3 point)

Sets position of the spot.

point

  • Position of the spot.
 function Spot.setCode(Spot self, number code)

Sets position of the spot.

code

  • Laser code.

FOLLOW US