Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description: Returns direction turret is aiming at.
To convert the returned array into a degree value, use this formula:
_dir = (_vect select 0) atan2 (_vect select 1)

Syntax

Syntax: vehicle turretWeaponDirection [turret, weapon]
Parameters:
  • vehicle: Object - Vehicle with turrets
  • turret: Array - Path of turret to check
  • weapon: String - Class name of weapon to check on specified turret (optional)
Return Value: Vector3D - Direction vector is in world coordinates, i.e. it is independent from the vehicle's orientation.
If turret and weapon do not match (e.g. the weapon is on another turret), the direction of the weapon is returned.

Examples

Examples:
_dir = tank1 turretWeaponDirection [[0]]

Additional Information

See also: turretAzimuth, weaponDirection, setWeaponDirection, listAllTurrets
Multiplayer: 
Problems: 

Notes