世界内 物体进出 区域的 回调: havok 例子搜索 FilteredSurfaceVelocityDemo_PhantomListener 派生这个类,注册这个对象到世界
改变物体A接触物体B时候的速度 havok例子搜索 hkpFilteredSurfaceVelocityUtil
模型导入形状 havok例子搜索 hkpSimpleMeshShape -> hkpStorageExtendedMeshShape
组合物体 havok 例子搜索 hkpConvexTranslateShape-〉hkpListShape-〉hkpMoppBvTreeShape
改变物体摩擦力 m_movingBody->getMaterial().setFriction(0);
防止物体 卡死。。。 hkpViscoseSurfaceUtil::makeSurfaceViscose
运动类型:m_pointer->setMotionType( hkpMotion::MOTION_KEYFRAMED );MOTION_DYNAMIC, MOTION_FIXED
创建组物体 hkpListShape * handPointerShape = new hkpListShape(handPointerSpheres.begin(),handPointerSpheres.getSize());
PANTOM 自定形状 hkpShapePhantom* phantom = new hkpSimpleShapePhantom( shape, hkTransform::getIdentity() );
AABB PANTOM hkpAabbPhantom
物体施加作瞬间用力 applyLinearImpulseAsCriticalOperation
PHANTOM形状回调类 :hkpShape* boxShape , hkpPhantomCallbackShape, hkpBvShape* bvShape = new hkpBvShape( boxShape, myPhantomShape );
//也可以这么加PHANTOM
m_phantom = new hkMovingRBCollectorPhantom( infoAABB );
m_world->addPhantom( m_phantom );
重载 addOverlappingCollidable removeOverlappingCollidable 每帧 getOverlappingCollidables 去作用
创建凸面体 hkpConvexVerticesShape::BuildConfig config;
config.m_convexRadius = convexRadius;
hkpShape* shape = new hkpConvexVerticesShape(vertices,config);
为每个模型创建浮力Action
BuoyancyAction: public hkpUnaryAction
m_environment = new MyEnvironment(this);
m_environment->m_enableDrag = true;
m_environment->m_enableBuoyancy = true;
m_environment->m_waterDensity = 1000;
m_environment->m_drag = 600;
hkpAction* action=new BuoyancyAction(m_environment,rigidBody);
m_world->addAction(action);
action->removeReference();