Adding a camera to actor in Unreal Editor

6 ビュー (過去 30 日間)
kamarsto
kamarsto 2024 年 11 月 23 日
コメント済み: Nishan Nekoo 2024 年 12 月 4 日
I have a simulation in which I can move actors placed in the Unreal Editor as well as Simulink using Simulink. I have tried adding a camera to this simulation by going through the walkthrough available on the site: https://www.mathworks.com/help/aeroblks/place-cameras-on-actors-in-the-unreal-editor.html. I have not managed to accomplish this. The crash I am getting is presented in the included image. Adding an actor using Unreal Editor is important to me as I want to be able to customise the camera further than the Simulation 3D Camera allows.
I have tried adding a camera by using a Simulation 3D Camera Get block and a Sim3dSceneCap actor. My actors are presented in the following image.
I also think that the section: Place Camera on Vehicle in Custom Project in the walkthrough is inconsistent with regards to whether it uses: Sim3DCamera or Sim3dSceneCap. I, however, do not exclude the possibility that I do not understand something.
Could you explain how to interface in Simulink to a camera added in the editor?

回答 (1 件)

Nishan Nekoo
Nishan Nekoo 2024 年 11 月 26 日
編集済み: Nishan Nekoo 2024 年 12 月 2 日
Thank you for pointing out the inconsistencies in that documentation page around the Sim3DCamera and Sim3dSceneCap - we'll look into addressing this in a future release. In the meantime, please refer to this documentation page for a similar workflow: https://www.mathworks.com/help/vdynblks/ug/place-cameras-on-actors-in-the-unreal-editor.html
The crash seems to indicate that an actor that doesn't exist is being read or written to.
Nishan
  8 件のコメント
kamarsto
kamarsto 2024 年 12 月 4 日
編集済み: kamarsto 2024 年 12 月 4 日
Yes, that is correct.
I have just managed to attach a camera to a Sim3dStaticMeshActor and move it using a Simulation 3D Actor Transform Set block. In the future I will probably attempt to do it using methods in this walkthrough: https://www.mathworks.com/help/releases/R2024b/vdynblks/ug/get-started-communicating-with-the-unreal-engine-visualization-environment.html . I have already went through it succesfully, but without the camera (my troubles started when I wanted to add camera to the simulation I got as a result of completion of the walkthrough).
I have an issue now that after doing any changes in Unreal I have to reopen it via Simulink to get the Simulink past the initialisation stage. Before pressing run in both applications was sufficient.
Edit: I have to do this after each simulation, no matter whether there are any changes
Nishan Nekoo
Nishan Nekoo 2024 年 12 月 4 日
That sounds like unexpected behavior and I apologize for the inconvenience! I'd recommend you reach out to our Tech Support team who can work directly with you to resolve your specific issue.
It would be good to get access to your project so that we can understand the issue better and ensure that your interface has been set up correctly.
Nishan

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulation についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by