how attach camera to object(convex mesh)

Dmitriy

07-05-2012 05:03:21

Hello everybody, can anyone help me?
Usually I connect camera to my object by this way:


Ogre::SceneNode* camNode = this->_hydroNodeEx->createChildSceneNode("camNode");
camNode->attachObject(mCamera);


But what If I create Convex Mesh through critter? How can I attach my camera to object created by that way?

betajaen

07-05-2012 07:11:39

Then you attach the Camera to the Body in Critter.

All it is a SceneNode, that automatically matches the position of the NxActor in PhysX.

Dmitriy

07-05-2012 08:39:58

But How? What method i should use to attach my camera to the Critter::Body?

Ivancho

08-05-2012 07:35:05

camera-lookat ?

Dmitriy

08-05-2012 11:38:29

No, I found already. It was
mBody->getNode()->getSceneNode()->attachObject(myCamera);