mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
674 B
Plaintext
26 lines
674 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: jaynus / nou
|
|
* Change a projectile's direction, maintaing speed
|
|
* No longer used in guidancePFH, kept for backwards compatibility
|
|
*
|
|
* Arguments:
|
|
* 0: Projectile <OBJECT>
|
|
* 1: Direction (unit vector) <ARRAY>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [missile, [0,1,0]] call ace_missileguidance_fnc_changeMissileDirection;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_projectile", "_pitch", "_yaw", "_roll"];
|
|
|
|
private _dir = [sin _yaw * cos _pitch, cos _yaw * cos _pitch, sin _pitch];
|
|
private _up = [[sin _roll, -sin _pitch, cos _roll * cos _pitch], -_yaw] call BIS_fnc_rotateVector2D;
|
|
|
|
_projectile setVectorDirAndUp [_dir, _up];
|