From 9ffe0ada1e1348f5361c0e730081c221857142ea Mon Sep 17 00:00:00 2001 From: Vanessa Karolek <vaka1997@uni-koblenz.de> Date: Wed, 26 Jan 2022 19:00:28 +0100 Subject: [PATCH] set trackball camera center to particle volume center --- projects/wobble_bobble/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/wobble_bobble/src/main.cpp b/projects/wobble_bobble/src/main.cpp index d6df1c9b..e4000544 100644 --- a/projects/wobble_bobble/src/main.cpp +++ b/projects/wobble_bobble/src/main.cpp @@ -108,7 +108,8 @@ int main(int argc, const char **argv) { vkcv::gui::GUI gui (core, windowHandle); cameraManager.addCamera(vkcv::camera::ControllerType::PILOT); - cameraManager.addCamera(vkcv::camera::ControllerType::TRACKBALL); + uint32_t trackballIdx = cameraManager.addCamera(vkcv::camera::ControllerType::TRACKBALL); + cameraManager.getCamera(trackballIdx).setCenter(glm::vec3(0.5f, 0.5f, 0.5f)); // set camera to look at the center of the particle volume auto swapchainExtent = core.getSwapchain(windowHandle).getExtent(); -- GitLab