How to show a projectile hitting a wall in app designer

2 次查看(过去 30 天)
i currently have code for a projectile and for an obstacle to appear. How would i show the projectile hitting the obstacle and then falling down at the place of hitting it? this is also one of two conditions so how should i go about separating these? im thinking to use a for loop where i use the values for obstacle height and distance to, to determine whether the obstacle condition is running?
Currently this the code for plotting:
Ox = app.DistancetothewallobstaclefromlaunchEditField.Value
Oy = app.ObstacleheightEditField.Value
Ot = (app.ObstaclethicknessSlider.Value)/100
rectangle(app.Graph,'Position',[Ox 0 Ot Oy],'FaceColor',[0.6353 0.0784 0.1843]) %obstacle plot
hold(app.Graph,'on')
comet(app.Graph,x,y,0.1) %projectile plot

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by