Add optional azimuth and elevation to initial free camera.
- Add `azimuth` and `elevation` to `visual.global`. - Add `mjv_defaultFreeCamera`. - Use `mjv_defaultFreeCamera` in `simulate`. PiperOrigin-RevId: 465505244 Change-Id: I61e60f14a990d4e2d220958adb75c325001978ee
This commit is contained in:
committed by
Copybara-Service
parent
5ee184ddaa
commit
b966a37855
+2
-5
@@ -74,11 +74,8 @@ void initMuJoCo(const char* filename) {
|
||||
mjv_makeScene(m, &scn, 2000);
|
||||
mjr_makeContext(m, &con, 200);
|
||||
|
||||
// center and scale view
|
||||
cam.lookat[0] = m->stat.center[0];
|
||||
cam.lookat[1] = m->stat.center[1];
|
||||
cam.lookat[2] = m->stat.center[2];
|
||||
cam.distance = 1.5 * m->stat.extent;
|
||||
// default free camera
|
||||
mjv_defaultFreeCamera(m, &cam);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user