Adding vr world in App Designer panel

3 views (last 30 days)
Hi, I'm making an app where i want to display the vrworld i've created in app Designer panel, but since Mathworks have changed Guide to App Designer, i can't find any way on how to do it now. Can any one show me how to do that?

Answers (1)

Sai Teja G
Sai Teja G on 12 Oct 2023
Hi Orest,
I understand that you want to display the ‘vrworld’ in the AppDesigner panel.
You can find a sample code below that demonstrates how to display a 'vrworld' in App Designer:
function app_OpeningFcn(app, ~, ~, varargin)
% Create the VR world
vrworld = vrworld('path_to_your_vrworld_file.wrl');
% Open the VR world
open(vrworld);
% Create a VR figure
vrfigure = vrfigure(vrworld);
% Parent the VR figure to the App Designer panel
app.Panel.UIContainer.Children = vrfigure;
end
To learn more about the 'vrworld()' function and its details, you can refer to the following documentation:
Hope it helps!
Best Regards,
Sai Teja G

Community Treasure Hunt

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

Start Hunting!