BIS fnc lerpVector: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (infobox to template)
m (page filled)
Line 1: Line 1:
{{Function|= Comments
{{Function


| arma3 |Game name=
|game1= arma3


|1.78|Game version=
|version1= 1.78


<!---|arg= local |Multiplayer Arguments=--->
<!--|exec= server|=-->


<!---|eff= local |Multiplayer Effects=--->
<!--|arg= local-->


| <pre>/*
<!--|eff= local-->
Author:
Nelson Duarte


Description:
|descr=  Given two different vectors A and B, think of a straight line drawn between them
Given two different vectors A and B, think of a straight line drawn between them
With _alpha saying how far along that line you are
With _alpha saying how far along that line you are


Parameters:
|s1= [currentValue, targetValue, alpha] call [[BIS_fnc_lerpVector]]
_this: ARRAY
0: ARRAY - The current value
1: ARRAY - The target value
2: SCALAR - The alpha


Returns:
|p1= currentValue: [[Array]] - Vector Start
ARRAY
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=


|[] call [[BIS_fnc_lerpVector]]|Syntax=
|p2= targetValue: [[Array]] - Vector End


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|p3= alpha: [[Number]] - Alpha


|Datatype - description|Return value=
|r1= [[Array]] - Interpolated vector


|x1= <code></code>|Example 1=


|exec= call |Execution=
|x1= <code>[<noWiki>[</noWiki>1592.74,6558.36,0],[2240.43,7459.69,0],0.3] [[call]] [[BIS_fnc_lerpVector]];{{cc|Returns [1787.05,6828.76,0]}}</code>
 
|exec= call
 
|seealso= [[BIS_fnc_clerp]] [[BIS_fnc_slerp]] [[BIS_fnc_lerp]] [[BIS_fnc_inverseLerp]]


| |See also=
}}
}}



Revision as of 18:28, 9 January 2020

Hover & click on the images for description

Description

Description:
Given two different vectors A and B, think of a straight line drawn between them With _alpha saying how far along that line you are
Execution:
call
Groups:
Uncategorised

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

See also:
BIS_fnc_clerp BIS_fnc_slerp BIS_fnc_lerp BIS_fnc_inverseLerp

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