Allow parent targeting for cameras and lights.

PiperOrigin-RevId: 628002614
Change-Id: I047dd3d62cfbc6432a3ec53fe6465afc52ca615b
This commit is contained in:
Yuval Tassa
2024-04-25 02:09:32 -07:00
committed by Copybara-Service
parent e9709900b4
commit cbb048ff00
2 changed files with 46 additions and 10 deletions
-10
View File
@@ -2647,11 +2647,6 @@ void mjCCamera::Compile(void) {
}
}
// make sure it is not targeting parent body
if (targetbodyid==body->id) {
throw mjCError(this, "parent-targeting in camera '%s' (id = %d)", name.c_str(), id);
}
// make sure the image size is finite
if (fovy >= 180) {
throw mjCError(this, "fovy too large in camera '%s' (id = %d, value = %d)",
@@ -2791,11 +2786,6 @@ void mjCLight::Compile(void) {
throw mjCError(this, "unknown target body in light '%s' (id = %d)", name.c_str(), id);
}
}
// make sure it is not self-targeting
if (targetbodyid==body->id) {
throw mjCError(this, "parent-targeting in light '%s' (id = %d)", name.c_str(), id);
}
}