Do not reset camera_id if no tracking object is set.

Otherwise, we can never incrementally move beyond a free camera.

PiperOrigin-RevId: 830845627
Change-Id: I07e8639f79efcdae451999ca07b91a41360752ca
This commit is contained in:
Haroon Qureshi
2025-11-11 04:02:12 -08:00
committed by Copybara-Service
parent 88e75cd7e6
commit b3deb9dd12
-1
View File
@@ -599,7 +599,6 @@ int SetCamera(const mjModel* m, mjvCamera* camera, int request_idx) {
camera->fixedcamid = -1;
} else {
camera->type = mjCAMERA_FREE;
camera_idx = 0;
}
} else {
camera->type = mjCAMERA_FIXED;