Code: Select all
ICameraSceneNode cam* = smgr->addCameraSceneNode();
now when I parent the camera to the spaceship using this
cam->setParent(spaceShip) and i change the position of the spaceship, the camera position remains the same. I have seen the camera's absolute position which is always (0,0,0) whereas the relative position remains the same as was given by cam->setPosition. What am i doing wrong here?
I found a workaround which is to adjust the camera position whenever the spaceship position changes so that it is always having the same offset from its parent i.e the spaceship but then why should i do this when it should have been handled automatically?