フィルターのクリア

How to show a projectile hitting a wall in app designer

2 ビュー (過去 30 日間)
Anon
Anon 2020 年 12 月 22 日
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 Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by