Quantcast
Channel: Intel® Developer Zone - Havok
Viewing all articles
Browse latest Browse all 168

Shape penetrated by hkpCharacterProxy

$
0
0

I load a mesh and convert it to hkpMoppBvTreeShape(no simplify).


code as follow:


hkpSimpleMeshShape* storageMeshShape = new hkpSimpleMeshShape( 0.01f );


......build the storageMeshShape(abbreviation)


hkpMoppCompilerInput mci;
 {
  mci.m_cachePrimitiveExtents  = true;
  mci.m_enableChunkSubdivision = true;
 }


 hkpMoppCode* moppCode = hkpMoppUtility::buildCode(storageMeshShape, mci);


 hkpMoppBvTreeShape* moppBvTreeShape = new hkpMoppBvTreeShape(storageMeshShape, moppCode);


and create static rigidbody


hkpRigidBodyCinfo bodyinfo;
bodyinfo.m_restitution=0.0f;
bodyinfo.m_allowedPenetrationDepth=0.001f;
bodyinfo.m_collisionFilterInfo=hkpGroupFilter::calcFilterInfo(g_iHavokLayerStatic);


But in game,my hkpCharacterProxy can penetrate it in same position.


Is it because of concave faces in mesh?


Viewing all articles
Browse latest Browse all 168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>