BIS fnc terrainGradAngle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) - ([a-z -]+) \|x1=" to "|r1=$1 - $2 |x1=")
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma3
|game1= arma3
 
|version1= 1.00
|1.00


|gr1= Geometry
|gr1= Geometry


| Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction.
|descr= Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction.
It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.
It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.


| <!-- [object, direction, delta] call [[BIS_fnc_terrainGradAngle]]; -->
|s1= <!-- [object, direction, delta] call [[BIS_fnc_terrainGradAngle]]; -->


|p1= object: [[Object]] or [[Position]]
|p1= object: [[Object]] or [[Position]]
Line 20: Line 19:
|r1= [[Number]] - gradient angle in radians
|r1= [[Number]] - gradient angle in radians


|x1= <code>_radGrad = [<nowiki/>[[getPos]] [[player]], [[getDir]] [[player]]] [[call]] [[BIS_fnc_terrainGradAngle]];</code>
|x1= <sqf>private _radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;</sqf>


|seealso= [[getDir]], [[surfaceNormal]]
|seealso= [[getDir]] [[surfaceNormal]]
}}
}}
[[Category:{{Name|arma3}}: Functions|{{uc:terrainGradAngle}}]]

Latest revision as of 18:00, 13 July 2022

Hover & click on the images for description

Description

Description:
Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction. It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.
Execution:
call
Groups:
Geometry

Syntax

Syntax:
Syntax needed
Parameters:
object: Object or Position
direction: Number - direction where should be gradient calculated (compass direction)
delta: Number - which stepsize should be used
Return Value:
Number - gradient angle in radians

Examples

Example 1:
private _radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;

Additional Information

See also:
getDir surfaceNormal

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