I think I'm doing this right and tried a few ways to get the same effect. I should be able to attach children to the Camera, right? Just the same way that you set a node to any other parent scene node?
camera is my camera.
Code: Select all
Player.SwordNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/sword.ms3d"),camera,-1,irr::core::vector3df(-30.0f,-10.0f,0.0f),irr::core::vector3df(90,35,90),irr::core::vector3df(1.0f,1.0f,1.0f));
The other hack I tried was to move the scenenodes to the camera's position every frame, setPosition worked fine. But this didn't do anything.
Code: Select all
Sword.NodePointer->setRotation(camera->getRotation());