~jb55/polyadvent

ref: 18ba03463e02ed86ed00b371947997c9a58dcb6f polyadvent/doc/terrain-collision.txt -rw-r--r-- 702 bytes
18ba0346William Casarin dampen terrain height near edge 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Basic Idea
==========

Use an overlay grid for space partitioning vertex indices:

      0     1     2     3     4     5
    0 +-----+-----+-----+-----+-----+
      |     |     |     |     |     |
    1 +-----+-----+-----+-----+-----+
      |     |     | *   |     |     |
    2 +-----+-----+-----+-----+-----+
      |     |     |   * | * * |     |
    3 +-----+-----+-----+-----+-----+
      |     |  a  |  *  |  *  |     |
    4 +-----+-----+-----+-----+-----+
      |     |     |     |     |     |
    5 +-----+-----+-----+-----+-----+

  buckets = size / pdist ?


Where *'s are indices to the corresponding vertex. We'll need to save
height in memory so that collision can reference the heights.