
How to make 3D simulation viewer follower actor?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Nishan Nekoo
el 23 de Oct. de 2025
Editada: Nishan Nekoo
el 24 de Oct. de 2025
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
2 comentarios
Ver también
Categorías
Más información sobre View and Analyze Simulation Results en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!