Add multiple actors in one Simulink Simulation 3D Actor Block
이전 댓글 표시
I am trying to mimic the example https://www.mathworks.com/help/sl3d/automate-virtual-assembly-line.html, with a much simpler starting case. However, I am finding that the second object created in the block does not show in the 3D simulation viewer. Is there some command I need to run to force it to render? It is not Hidden, according to its properties.
Here is my "loadActors.m" file:
function loadActors(Actor, World)%Load actors
%Actor.load('Actor1_scene.mat')
Actor1 = Actor;
createShape(Actor1, 'box', [0.2, 0.2, 1]);
Actor2 = sim3d.Actor('ActorName','Actor2');
%Actor2.load('Actor2_scene.mat');
createShape(Actor2, 'cylinder', [0.5, 0.5, 0.75]);
add(World, Actor2);
It is called as follows:

And the output is:

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!