dbrock
05-03-2008 05:50:07
I've got my door setup, and I've been tampering with the limits, and so far I've got it to spin 90 degrees in the direction that I wanted it to, and then it closes. But if the player is on the other side of the door, he can not open it. I'd prefer to just use a trigger, and have it add a force and open the door, so disabling collision between the door and the player would be ideal, I just haven't setup those collision groups yet.
Any pointers on setting up the limits to do what I need? Here is what I've got so far:
Here is what it looks like:
http://deadcold.smallchangestudios.net/clips/door.wmv
Any pointers on setting up the limits to do what I need? Here is what I've got so far:
Door::Door( NxOgre::Body* body, const Ogre::Vector3& axis )
{
m_Body = body;
NxOgre::Scene* scene = GameManager::getSingletonPtr()->getPHYSWorld()->getScenes()->begin();
NxOgre::JointParams jp;
jp.setToDefault();
jp.mHasLimits = true;
jp.mUpperLimit = 0;
jp.mLowerLimit = -0.45f * NxPi;
m_Joint = scene->createRevoluteJoint( m_Body,
axis,
Ogre::Vector3(
m_Body->getGlobalPosition().x,
m_Body->getGlobalPosition().y,
m_Body->getGlobalPosition().z - 1.926336f ),
jp
);
}
Here is what it looks like:
http://deadcold.smallchangestudios.net/clips/door.wmv