Attaching a mesh to a camera node.
Attaching a mesh to a camera node.
I am trying to attach a mesh to a camera so that the mesh stays with the camera as it moves around. Which camera node should I use for this and how do I get it to stay with it? I've been playing around with it for a while but I still cant get it to go.
-
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
I do have that, yet the camera plows right through the mesh.bal wrote:Load node, set its position, load camera and do camera->addChild(node); ?
IAnimatedMeshSceneNode* weaponNode = smgr->addAnimatedMeshSceneNode(mesh, camera, -1);
weaponNode->setScale(vector3df(14,10,14));
weaponNode->setPosition(vector3df(23,-10,5));
weaponNode->setRotation(vector3df(180,0,180));
camera->addChild(weaponNode);