2024-03-19 19:43:02 +05:30
|
|
|
# Manhattan Distance node
|
|
|
|
Returns the distance between two points using Manhattan distance matrix.
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
**Controls**
|
|
|
|
|Options|Description|
|
|
|
|
|---|---|
|
|
|
|
|Vector2, Vector3|Vector type to use for calculation|
|
|
|
|
|
|
|
|
**Inputs**
|
|
|
|
|Name|Type|Binding|Description|
|
|
|
|
|---|---|---|---|
|
|
|
|
|a|Dynamic vector|none|Point a|
|
|
|
|
|b|Dynamic vector|none|Point b|
|
|
|
|
|
|
|
|
**Outputs**
|
|
|
|
|Name|Type|Binding|Description|
|
|
|
|
|---|---|---|---|
|
|
|
|
|distance|float|None|Distance between 2 points|
|
2024-04-15 22:29:35 +05:30
|
|
|
|
|
|
|
**ShaderInc location**
|
2024-07-21 16:39:45 +05:30
|
|
|
<br>`res://addons/ShaderLib/Maths/Maths.gdshaderinc`
|
2024-04-15 22:29:35 +05:30
|
|
|
|
|
|
|
**Method signature**
|
|
|
|
<br>For 2D - `float manhattan_distance_2d(vec2 point1, vec2 point2)`
|
|
|
|
<br>For 3D - `float manhattan_distance_3d(vec3 point1, vec3 point2)`
|
|
|
|
|
|
|
|
**Parameters for 2D**
|
|
|
|
|Name|Type|Description|
|
|
|
|
|---|---|---|
|
|
|
|
|point1|vec2|Point a|
|
|
|
|
|point2|vec2|Point b|
|
|
|
|
|
|
|
|
**Parameters for 3D**
|
|
|
|
|Name|Type|Description|
|
|
|
|
|---|---|---|
|
|
|
|
|point1|vec3|Point a|
|
|
|
|
|point2|vec3|Point b|
|
2024-03-19 19:43:02 +05:30
|
|
|
___
|