apply gimpact versus rotated plane issue,thanks to @cameronwhite

see bd8bd11929
Fixes Issue 69
This commit is contained in:
Erwin Coumans 2018-12-22 16:38:40 -08:00
parent d477d18ad6
commit 7740162ad8

View File

@ -50,10 +50,11 @@ public:
void get_plane_equation_transformed(const btTransform& trans, btVector4& equation) const
{
equation[0] = trans.getBasis().getRow(0).dot(m_planeNormal);
equation[1] = trans.getBasis().getRow(1).dot(m_planeNormal);
equation[2] = trans.getBasis().getRow(2).dot(m_planeNormal);
equation[3] = trans.getOrigin().dot(m_planeNormal) + m_planeConstant;
const btVector3 normal = trans.getBasis() * m_planeNormal;
equation[0] = normal[0];
equation[1] = normal[1];
equation[2] = normal[2];
equation[3] = normal.dot(trans * (m_planeConstant * m_planeNormal));
}
};