[SOLVED]need help , Actors Nodes Entitys movments

Xakiru

07-05-2010 16:56:57

Hey evrybody, I'm new in nxOgre and I'm facing a problem, i'm trying to make a lilte sumulation, here is my question :
how to make an Ogre entity attached to a nxOgre phisical object ?

I have read , that OGRE3DBody containt one Entity and one SceneNode , but the problem is that the SceneNode is attached to the main one, so there are noway that I can attache it to another one.

Here what i have already made using Ogre :
Maine Node -> MyControlledNode -> [ Node(Have a Camera Attached) && Node(Have the Main character Entity Attached) ]

Now i need that my main character to move things when it touch them ...


Thanks by advence.
Other problems i'm trying to solve :S , the Visual debugger is not showing physical shemes, NodeRenderableParams and ActorParams arn't working , it says that they arn't defined in nxOgre

Xakiru

11-05-2010 10:43:37

I've found a way to do it ,i think it's a basic thing to know these things :
void turnR(){
Ogre::Quaternion testQuat1 = mCube->getGlobalOrientationQuat().as<Ogre::Quaternion>();
Ogre::Quaternion testQuat2(Ogre::Radian(0.01f), Ogre::Vector3(0, 1, 0));
Ogre::Quaternion testQuat3 = testQuat1 * testQuat2;
mCube->setGlobalOrientationQuat(NxOgre::Quat(testQuat3));
}
void turnL(){
Ogre::Quaternion testQuat1 = mCube->getGlobalOrientationQuat().as<Ogre::Quaternion>();
Ogre::Quaternion testQuat2(Ogre::Radian(0.01f), Ogre::Vector3(0, -1, 0));
Ogre::Quaternion testQuat3 = testQuat1 * testQuat2;
mCube->setGlobalOrientationQuat(NxOgre::Quat(testQuat3));
}
void goF(float a){
setAnimation(1);
mAnimationState->addTime(a);
mCube->setGlobalPosition(NxOgre::Vec3(pNode->getPosition() + pNode->getOrientation() * Vector3(speed,0,0)));
}
void goB(float a){
setAnimation(1);
mAnimationState->addTime(a);
mCube->setGlobalPosition(NxOgre::Vec3(pNode->getPosition() + pNode->getOrientation() * Vector3(-speed,0,0)));
}

these are the functions to make the character(Ogre3DBody) moves forward and back , and turn left and right, it .

NB: The VisualDebugger is not aviable in the BloodyMess 1.5.5