
How to make 3D simulation viewer follower actor?
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi there,
I am currently working on a simulation where I want to be able to follow a specfic actor with the camera. I.e. I want to have my camera 'locked' on an actor and follow it. I've tried some of the camera blocks, but nothing seems to change the behavior of the camera in the Simulation 3D envoirment. If anyone knows how to do this, it would be much appreciated if that knowledge was shared with me.

(The actor I want the camera to follow)
Thanks in advance.
0 Commenti
Risposte (1)
Nishan Nekoo
il 23 Ott 2025 alle 17:09
Modificato: Nishan Nekoo
il 24 Ott 2025 alle 12:21
Hi Mats,
If you just want to see this actor in the viewer window, the best way to do this would be to select a "Scene View" in the Simulation 3D Scene Configuration block. You can select this actor, which puts the main camera at the actor origin, but then specify a custom translation and rotation offset to get a different view of the actor.

You can also interactively fix a camera to an actor by hovering over the actor in the Simulation 3D Viewer and pressing 'O' during a simulation.
More information on navigating the 3D environment here: https://www.mathworks.com/help/sl3d/navigate-in-3d-environment.html
Adding a Simulation 3D Camera or Simulation 3D Camera Get does not interact the view of the main window, it just adds an additional sensor to the 3D environment and you can view the output of the camera by connecting it to a Video Viewer.
Hope that helps, and please feel free to ask any follow-up questions!
Nishan
0 Commenti
Vedere anche
Categorie
Scopri di più su View and Analyze Simulation Results in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!