我正在尝试制作一个简单的FPS游戏,但是角色现在可以飞起来了。所以我想使用ratText()来检测冲突。不幸的是,我无法创建btCollisionWorld()。控制台说:“未捕获的对象无法构造btCollisionWorld,IDL中没有构造函数。”
collisionConfiguration = new Ammo.btSoftBodyRigidBodyCollisionConfiguration();//btSoftBodyRigidBodyCollisionConfiguration
dispatcher = new Ammo.btCollisionDispatcher(collisionConfiguration);
broadphase = new Ammo.btDbvtBroadphase();
solver = new Ammo.btSequentialImpulseConstraintSolver();
softBodySolver = new Ammo.btDefaultSoftBodySolver();
physicsWorld = new Ammo.btSoftRigidDynamicsWorld(dispatcher,broadphase,solver,collisionConfiguration,softBodySolver);
physicsWorld.setGravity(new Ammo.btVector3(0,gravityConstant,0));
physicsWorld.getWorldInfo().set_m_gravity(new Ammo.btVector3(0,gravityConstant,0));
collisionWorld = new Ammo.btCollisionWorld(dispatcher,broadphase,collisionConfiguration);
什么是IDL,以及如何将btCollisionWorld()构造为IDL?