This is an old revision of the document!
If you wish the camera to be fixed on a moving object, you will need to use code to update it regularly. The camera's x and y coordinates are copied from the object, but not the z coordinate.
void orxFASTCALL Update(const orxCLOCK_INFO *_pstClockInfo, void *_pContext) { orxVECTOR cameraPosition = { 0,0,0 }; orxCamera_GetPosition(camera, &cameraPosition); orxVECTOR heroPosition= { 0,0,0 }; orxObject_GetPosition(hero, &heroPosition); cameraPosition.fX = heroPosition.fX; cameraPosition.fY = heroPosition.fY; orxCamera_SetPosition(camera, &cameraPosition); ... } orxSTATUS orxFASTCALL Init() { ... orxClock_Register(orxClock_FindFirst(orx2F(-1.0f), orxCLOCK_TYPE_CORE), Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL); ...