improved robustness of penetrations involving triangles and boxes, by adding their 'preferred' penetration directions.
added wireframe/solid mode for meshes updated solid penetration depth solver (comparison in Extras)
This commit is contained in:
@@ -157,6 +157,18 @@ public:
|
||||
return "Triangle";
|
||||
}
|
||||
|
||||
virtual int getNumPreferredPenetrationDirections() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
|
||||
{
|
||||
calcNormal(penetrationVector);
|
||||
if (index)
|
||||
penetrationVector *= -1.f;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user