when I first use the "appBasicDemo"
the "floor" is :
btCollisionShape* groundShape = new btSphereShape(btScalar(50.));
but when I change it to:
btCollisionShape* groundShape = new btBoxShape(btVector3(50.,50,50));
I found that:the shotBox can run through the ground!
what's the matter?I am a learner,I need your help right now ,cause it's important for me.
HELP!:a strange question but easy to perform
-
- Posts: 3
- Joined: Thu Aug 30, 2007 11:38 am
-
- Posts: 3
- Joined: Thu Aug 30, 2007 11:38 am
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
The basic demo is confusing indeed, it doesn't register any collision functions, because it passes 'true' in the constructor.
Please remove the 'true' to fix this:
Thanks,
Erwin
Code: Select all
m_dispatcher = new btCollisionDispatcher(true);
Code: Select all
m_dispatcher = new btCollisionDispatcher();
Erwin
-
- Posts: 3
- Joined: Thu Aug 30, 2007 11:38 am
-
- Posts: 23
- Joined: Wed Oct 03, 2007 4:03 am
Re: HELP!:a strange question but easy to perform
Which version of bullet are you guys using? I downloaded Bullet 2.62 and I am getting an error that says
'btCollisionDispatcher' : no appropriate default constructor available
I get this when I leave the constructor blank, as was suggested in the last post. I have to do something like,
On a similar note, I have my world set up like this, based on some of the demo code I have been seeing:
Is this right? My objects are going crazy in my world so I don't think my world is set up right.
'btCollisionDispatcher' : no appropriate default constructor available
I get this when I leave the constructor blank, as was suggested in the last post. I have to do something like,
Code: Select all
dispatcher = new btCollisionDispatcher(collisionConfiguration);
Code: Select all
btCollisionDispatcher* dispatcher=0;
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
dispatcher = new btCollisionDispatcher(collisionConfiguration);
btVector3 worldAabbMin(-100000,-100000,-100000);
btVector3 worldAabbMax(100000,100000,100000);
btBroadphaseInterface* broadphase = new btAxisSweep3(-worldAabbMax,worldAabbMax);
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
m_btDynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver);
m_btDynamicsWorld->getDispatchInfo().m_enableSPU = true;