mirror of
https://github.com/ravmustang/eXpochVectorBuild4Exile.git
synced 2024-08-30 17:22:11 +00:00
Exile Snapping #1
This commit is contained in:
parent
1be712d100
commit
a1dd93b901
@ -108,9 +108,9 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
ExileClientConstructionPossibleSnapPositions = [];
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
_position = getPosATL player;
|
||||
_position set [2, -500];
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_position set [2, -500];
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
_potentionalSnapObject = cursorTarget;
|
||||
if !(isNull _potentionalSnapObject) then
|
||||
{
|
||||
@ -133,19 +133,15 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
}
|
||||
else
|
||||
{
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_vectorUp = _newDirAndUp select 1;
|
||||
ExileClientConstructionObject setVectorDirAndUp [_vectorDirection,_vectorUp];
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
ExileClientConstructionObject setPosATL _position;
|
||||
ExileClientConstructionObject attachTo [ExileClientConstructionCurrentSnapToObject,ExileClientConstructionOffset];
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
{
|
||||
if (_x distance _position < 1) exitWith
|
||||
{
|
||||
_position = _x;
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_rotation = (ExileClientConstructionRotation + (getDir ExileClientConstructionCurrentSnapToObject) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
_vectorUp = vectorUp ExileClientConstructionCurrentSnapToObject;
|
||||
ExileClientConstructionIsSnapped = true;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user