Edit: The next part of this post is largely irrelevant because I think I solved the problem. In BulletC4MotionState.cpp and .h, the method: getWorldTransform should be const! A-ha!
Hi Erwin. I've been trawling the forums here and on C4 for the last few days deciding on whether to take the plunge... and I did. The decision was partially based on how friendly and helpful you and Eric seem to be
I am trying to use your integration with C4 in order to build an artificial intelligence simulator for some research I'm working on.
Anyways, I naively included the new files from the BulletC4Physics directory of your integration demo. I then replaced replaced the MGWeapons.cpp and MGGame.cpp from my project with yours files.
Finally, I pointed XCode to the source directory from a *newer* download of bullet (2.32 is the distribution I have, but the integration I downloaded is from 2.23). I have an error when compiling.
It doesn't like you doing:
btMotionState* motionState = new BulletC4MotionState(node,centerOfMassOffset);
inside
void BulletPhysicsMgr::AddObjects(World *theWorld)
It's not happy about you doing that because BulletC4MotionState has not implemented:
virtual void getWorldTransform(btTransform& worldTrans);
virtual void setWorldTransform(const btTransform& worldTrans);
I'm too new with C4 and Bullet to know why this has happened. I clearly understand the problem, just not why it exists... seems like you would have had trouble compiling too. The only thing I can think of is that these weren't pure virtual in btMotionState in a previous release?
Anyways, any suggestions?
Also: when I get past the compile stage and have to link this is going to explode. Do you know exactly what I need to link to in the Bullet distribution. It was nice of your to provide a VC++ project, but I'm working with Mac build libraries and XCode, so it's too different for me to know.
Thanks in advance!
Update: Somehow, I managed to get it compiled and linked. The Bullet 1 and Bullet 2 demos ran fast! I was really excited to run the PhysX demo, but the gravity controls didn't seem to work and the objects seemed really heavy... I could hardly move them around with my rocket launcher. What gives?