BIS fnc lerpVector: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *cc*\| *([^}]+) *\}\}" to "// $1") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 6: | Line 6: | ||
|gr1= Vectors | |gr1= Vectors | ||
|descr= Given two different vectors A and B, think of a straight line drawn between them | |descr= Given two different vectors A and B, think of a straight line drawn between them, ''alpha'' saying how far along that line is the wanted vector. | ||
|s1= [currentValue, targetValue, alpha] call [[BIS_fnc_lerpVector]] | |s1= [currentValue, targetValue, alpha] call [[BIS_fnc_lerpVector]] | ||
|p1= currentValue: [[Array]] - | |p1= currentValue: [[Array]] - vector start | ||
|p2= targetValue: [[Array]] - | |p2= targetValue: [[Array]] - vector end | ||
|p3= alpha: [[Number]] - Alpha | |p3= alpha: [[Number]] - Alpha | ||
Line 19: | Line 18: | ||
|r1= [[Array]] - Interpolated vector | |r1= [[Array]] - Interpolated vector | ||
|x1= < | |x1= <sqf>[[1592.74,6558.36,0], [2240.43,7459.69,0], 0.3] call BIS_fnc_lerpVector; // returns [1787.05,6828.76,0]</sqf> | ||
|seealso= [[BIS_fnc_clerp]] [[BIS_fnc_slerp]] [[BIS_fnc_lerp]] [[BIS_fnc_inverseLerp]] | |seealso= [[BIS_fnc_clerp]] [[BIS_fnc_slerp]] [[BIS_fnc_lerp]] [[BIS_fnc_inverseLerp]] | ||
}} | }} |
Revision as of 17:36, 13 July 2022
Description
- Description:
- Given two different vectors A and B, think of a straight line drawn between them, alpha saying how far along that line is the wanted vector.
- Execution:
- call
- Groups:
- Vectors
Syntax
- Syntax:
- [currentValue, targetValue, alpha] call BIS_fnc_lerpVector
- Parameters:
- currentValue: Array - vector start
- targetValue: Array - vector end
- alpha: Number - Alpha
- Return Value:
- Array - Interpolated vector
Examples
- Example 1:
- [[1592.74,6558.36,0], [2240.43,7459.69,0], 0.3] call BIS_fnc_lerpVector; // returns [1787.05,6828.76,0]
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note