mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Merge branch 'build-accelerator' into 'master'
heightfield: Only `buildAccelerator` on Bullet 2.89+ Closes #5874 See merge request OpenMW/openmw!630
This commit is contained in:
commit
eb11e1fcdb
@ -58,11 +58,14 @@ namespace MWPhysics
|
||||
mShape->setUseDiamondSubdivision(true);
|
||||
mShape->setLocalScaling(btVector3(triSize, triSize, 1));
|
||||
|
||||
// Enables acceleration of heighfield collissions.
|
||||
#if BT_BULLET_VERSION >= 289
|
||||
// Accelerates some collision tests.
|
||||
//
|
||||
// Bullet does not yet use this in the most time-consuming method, `btHeightfieldTerrainShape::processAllTriangle`.
|
||||
// See https://github.com/bulletphysics/bullet3/issues/3276
|
||||
// Note: The accelerator data structure in Bullet is only used
|
||||
// in some operations. This could be improved, see:
|
||||
// https://github.com/bulletphysics/bullet3/issues/3276
|
||||
mShape->buildAccelerator();
|
||||
#endif
|
||||
|
||||
btTransform transform(btQuaternion::getIdentity(),
|
||||
btVector3((x+0.5f) * triSize * (sqrtVerts-1),
|
||||
|
Loading…
x
Reference in New Issue
Block a user