Xenomorph
20-02-2011 23:25:41
I had to put my project on hold for a while and just started working on it again a couple of days ago. I updated the NxOgre to the current Detritus version and I had to change a few things to get them to compile correctly. After a few hours of looking into it I finally got the Visual Debugger to work again .
I also had to change the way I create Actors. That's where I also have a few questions.
That's how I did it before:
That's how I changed it:
I hope that's correct, but now the rigidBodyDescription and the boxDescription both have mMass. Which one am I supposed to use to set the mass?
Also I got the terrain to work properly. Now, when I enable my visualDebugger then all the actors are there and the physics terrain is there as well. The problem now is that they don't collide with each other anymore. Before I updated it all worked fine and everything collided. Do I have to set some flag I don't know about? I thought by default they should collide though.
Any help is highly appreciated.
Thanks!
I also had to change the way I create Actors. That's where I also have a few questions.
That's how I did it before:
NxOgre::RigidBodyDescription desc;
desc.mName = "Avatar";
desc.mMass = 11100; //normal takeoff weight
desc.mBodyFlags |= NxOgre::Enums::BodyFlags_DisableGravity;
desc.mBodyFlags |= NxOgre::Enums::BodyFlags_FreezeRotation;
//desc.mGroup = 0;
NxOgre::Matrix44 identity44;
identity44.identity();
mActor = DFAData::DFAPhysicsManager::getSingletonPtr()->getScene()->createActor(new NxOgre::Box(6.5, 4, 17), identity44, desc);
That's how I changed it:
NxOgre::RigidBodyDescription desc;
desc.mName = "Avatar";
desc.mMass = 11100; //normal takeoff weight
desc.mRigidbodyFlags |= NxOgre::DynamicRigidbodyFlags::DisableGravity;
desc.mRigidbodyFlags |= NxOgre::DynamicRigidbodyFlags::FreezeRotation;
//desc.mGroup = 0;
NxOgre::Matrix44 identity44;
identity44.identity();
NxOgre::BoxDescription boxDesc;
boxDesc.mSize = Vector3(6.5, 4, 17);
mActor = DFAData::DFAPhysicsManager::getSingletonPtr()->getScene()->createActor(boxDesc, identity44, desc);
I hope that's correct, but now the rigidBodyDescription and the boxDescription both have mMass. Which one am I supposed to use to set the mass?
Also I got the terrain to work properly. Now, when I enable my visualDebugger then all the actors are there and the physics terrain is there as well. The problem now is that they don't collide with each other anymore. Before I updated it all worked fine and everything collided. Do I have to set some flag I don't know about? I thought by default they should collide though.
Any help is highly appreciated.
Thanks!