Skip to content

Commit 3b4e978

Browse files
committed
Adding pathfinding using SDF example
1 parent ef9da0e commit 3b4e978

File tree

3 files changed

+689
-0
lines changed

3 files changed

+689
-0
lines changed

pathfinding_sdf/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Combining distance fields with path finding
2+
3+
![sdf-sample-05](https://github.com/zet23t/examples-c/assets/1007258/7e71e376-e6a8-4ee1-ae19-767d138a1b8a)
4+
5+
This example demonstrates how to use signed distance fields (SDF) for improving
6+
pathfinding.
7+
8+
* Unit size: A path may have a requirement for a minimum width to allow passage.
9+
By using the SDF values, we can block paths that are too narrow for the unit.
10+
* Path preferences: A unit may prefer to stay close to walls or avoid them. The example
11+
demonstrates how to influence the pathfinding by using the SDF values.
12+
* Varying step distances: Using SDF values to adjust step distances during path finding,
13+
resulting in curved paths.
14+
15+
The example is not optimized for performance, but rather to demonstrate the concept.

0 commit comments

Comments
 (0)