未被捕获的对象无法构造btCollisionWorld,IDL中没有构造函数

时间:2019-03-23 05:46:03

标签: javascript ammo.js

我正在尝试制作一个简单的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?

0 个答案:

没有答案