Anyone using btHeightfieldTerrainShape without problems (Not just plane terrain)?
I ask because of this issue:
https://www.youtube.com/watch?v=zCJwxk0 ... e=youtu.be
https://github.com/bulletphysics/bullet3/issues/57
its not usable ... someone need to fix that
btHeightfieldTerrainShape unusable
-
- Posts: 84
- Joined: Sun Jan 07, 2007 4:29 pm
- Location: Oxford, England
- Contact:
Re: btHeightfieldTerrainShape unusable
The only problems (with v2.81) I've had are:
- tunnelling when the velocity is high (to be expected)
- hitting internal triangle edges (not a big deal for me - and probably solvable anyway)
- performance problems due to missing broad-phase tests, resulting in more low-level tests than necessary (I have a local workaround, and I think Erwin fixed it anyway after some emails between us).
Other than that it's fine - works well for my flight sim: http://www.rowlhouse.co.uk/PicaSim. I use the diamond subdivision.
- tunnelling when the velocity is high (to be expected)
- hitting internal triangle edges (not a big deal for me - and probably solvable anyway)
- performance problems due to missing broad-phase tests, resulting in more low-level tests than necessary (I have a local workaround, and I think Erwin fixed it anyway after some emails between us).
Other than that it's fine - works well for my flight sim: http://www.rowlhouse.co.uk/PicaSim. I use the diamond subdivision.
Re: btHeightfieldTerrainShape unusable
Does anyone have the same problems with the terrain?
if i comment out the following code in btGjkPairDetector.h the collisoin for Cube,Capsule seems to work for static terrains.
The terrain demo works with static terrain, too.
https://github.com/bulletphysics/bullet3/issues/57
My english must be chinese for erwin...
if i comment out the following code in btGjkPairDetector.h the collisoin for Cube,Capsule seems to work for static terrains.
The terrain demo works with static terrain, too.
Code: Select all
// //if (m_fixContactNormalDirection)
//{
// ///@workaround for sticky convex collisions
// //in some degenerate cases (usually when the use uses very small margins)
// //the contact normal is pointing the wrong direction
// //so fix it now (until we can deal with all degenerate cases in GJK and EPA)
// //contact normals need to point from B to A in all cases, so we can simply check if the contact normal really points from B to A
// //We like to use a dot product of the normal against the difference of the centroids,
// //once the centroid is available in the API
// //until then we use the center of the aabb to approximate the centroid
// btVector3 aabbMin,aabbMax;
// m_minkowskiA->getAabb(localTransA,aabbMin,aabbMax);
// btVector3 posA = (aabbMax+aabbMin)*btScalar(0.5);
//
// m_minkowskiB->getAabb(localTransB,aabbMin,aabbMax);
// btVector3 posB = (aabbMin+aabbMax)*btScalar(0.5);//btVector3 diff = posA-posB;
// //if (diff.dot(normalInB) < 0.f)
// // normalInB *= -1.f;
//}
My english must be chinese for erwin...