Add multiple actors in one Simulink Simulation 3D Actor Block
Show older comments
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:

Accepted Answer
More Answers (0)
Categories
Find more on Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!