BIS fnc terrainGradAngle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|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. | | 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]]; --> | | <!-- [object, direction, delta] call [[BIS_fnc_terrainGradAngle]]; --> | ||
|p1= object: [[Object]] or [[Position]] | |p1= object: [[Object]] or [[Position]] | ||
|p2= direction: [[Number]] - direction where should be gradient calculated (compass direction) | |p2= direction: [[Number]] - direction where should be gradient calculated (compass direction) | ||
|p3= delta: [[Number]] - which stepsize should be used | |p3= delta: [[Number]] - which stepsize should be used | ||
| [[Number]] - gradient angle in radians | | [[Number]] - gradient angle in radians | ||
|x1= <code>_radGrad = [<nowiki/>[[getPos]] [[player]], [[getDir]] [[player]]] [[call]] [[BIS_fnc_terrainGradAngle]];</code> | |x1= <code>_radGrad = [<nowiki/>[[getPos]] [[player]], [[getDir]] [[player]]] [[call]] [[BIS_fnc_terrainGradAngle]];</code> | ||
| [[getDir]], [[surfaceNormal]] | | [[getDir]], [[surfaceNormal]] | ||
}} | }} | ||
Revision as of 23:47, 17 January 2021
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
Additional Information
- See also:
- getDirsurfaceNormal
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