Skip to content

Fix detournavigator test

Gleb Mazovetskiy requested to merge glebm/openmw:fix-detournavigator-test into master

Pass min/max to the btHeightfieldTerrainShape constructor.

This is required and only happened to work because shape.processAllTriangles did not check the Z axis.

This may change in the future, e.g. see https://github.com/bulletphysics/bullet3/pull/3287

Sets the min/maxValue so that they encompass the values but also so that (maxValue + minValue) / 2 is zero. This is because bullet always sets heightfield origin Z to the midpoint between min and max height.

Ensuring that the midpoint is zero means we don't have to change the test fixtures.

@elsid

Merge request reports