I have no idea why I was tagged, and also only the first 3 people in a comment get tagged. Please do not tag me on any future posts, unless I request a tag on a teaser (of which there are none for this post).
@SemedianIndustries "Hold the output forever" huh. Try looking at the code for the SWL-10. Its autopilot controls (and other adjustable values) use once.
On the topic of wingflex, what I'd do is output the liftForce from the physics wing on each side and then scale that number down and use it in the rotators. It allows for real wing flex taken directly from the lift force of the actual physics wing without a huge line of code.
Amazing plane! I just tried it out, and every switch does in fact work. I have some recommendations to make it even better:
- Make the buttons for the autopilot once instead of toggle
- The wings excessively wiggle when I roll hard
Other than that, there aren't any issues.
Keep up the good work!
hmm I found some seats to put in a full interior for the SWL-120. Might even make them functional. Just gotta visit Nasa for unrelated reasons one sec.
Let's say you have a part outputting to a variable. This part is the only source of that variable. If that part is destroyed, every single line of code using ANY variable breaks. A constant nullreferenceexception is also in the debug console.
For example, if that type of part breaks, then I have an engine stuck at full power even if I turn off AG 1, which should stop the engine.
Autopilot... complicated but explainable.
Lemme explain the basics in a p̶a̶r̶a̶g̶r̶a̶p̶h̶ short essay. I will be using the SWL-10's autopilot (wait, you can use that!) for this example. For the SWL-120 the basics will be the same.
The first thing we want to do is make a system which allows us to select a target heading, altitude, and vertical speed. You have done this. Now, we want to incorporate our current heading, vertical speed, and altitude. Then we want to find the difference between the two and then clamp that difference, so we get a number which smoothly goes to 0 as we approach all of our targets. Something important to note is Unity works in metric (meters, meters per second) instead of imperial (knots, feet).
Another good thing - A while ago, I made several YouTube videos about the development of the SWL-10, specifically focusing on the funky trees, and I think one or two were almost exclusively about the autopilot. I'm not sure if they include all the information, but I'll make a video or two when I make the SWL-120's autopilot. Here is the video about the autopilot. I'm pretty sure some info is missing, but let me know and I'll help you.
Oh, and here's the SWL-10. The autopilot is in the bottom few variables (the video will help), and some numbers might need tuning. I'd also recommend looking at the code in the four "physics wings" around the aircraft.
I'd also like to have a look at the funkyness in the cockpit of this regional airliner you're building.
One last thing - if you're really stuck, then I'd recommend waiting a month or two, until I can make a video on the SWL-120's autopilot, because in that video I'll try and make sure the entire video is dedicated to completely explaining how the autopilot works, and then coding and testing it.
If you have a couple, then upload and download them. You can delete them off the site after. If you have, say, a few thousand (like I did when I wanted to remove SP from my old iPad), then I used some third party software which could read my iPad.
@topfuel300 Just checked, instead of putting floor(A9) in the setter, put 0. I also noticed the rotator didn't work, simply put 1 (or -1) in the "max" section. Another important note is the priority. Set the priority of the variable setter (not the button) to -1, to ensure the button takes priority.
A doughnut or donut (/ˈdoʊnət/) is a type of food made from leavened fried dough.[1]: 275 It is popular in many countries and is prepared in various forms as a sweet snack that can be homemade or purchased in bakeries, supermarkets, food stalls, and franchised specialty vendors. Doughnut is the traditional spelling, while donut is the simplified version; the terms are often used interchangeably.
Doughnuts are usually deep fried from a flour dough, but other types of batters can also be used. Various toppings and flavorings are used for different types, such as sugar, chocolate or maple glazing. Doughnuts may also include water, leavening, eggs, milk, sugar, oil, shortening, and natural or artificial flavors.[1]: 232 [2][3][4][5]
The two most common types are the ring doughnut and the filled doughnut, which is injected with fruit preserves (the jelly doughnut), cream, custard, or other sweet fillings. Small pieces of dough are sometimes cooked as doughnut holes. Once fried, doughnuts may be glazed with a sugar icing, spread with icing or chocolate, or topped with powdered sugar, cinnamon, sprinkles or fruit. Other shapes include balls, flattened spheres, twists, and other forms.[4][5][6] Doughnut varieties are also divided into cake (including the old-fashioned) and yeast-risen type doughnuts.[6][7][8] Doughnuts are often accompanied by coffee or milk. They are sold at doughnut shops, convenience stores, petrol/gas stations, cafes or fast food restaurants.
@zwen This is very cool, and I will certainly be interested in using it for the SWL-120.
By rest, I mean the other buttons, like the numpad and vnav and rnav.
@zwen Nice! I'd love to have this system (all of it) in the SWL-120. Would it need fine tuning?
I'm also wondering, how do the rest of the buttons work? I got the altitude, heading, and speed AP working, but I'm not sure how to use the rest.
@pilotman10 What I mean is for players who can't run the main version, I will remove the fuselage and wings (leaving just the basic parts to make it fly the same as the main version) and then the cockpit will still be there.
I've added the code to the landing gear, which can be found here. Please note only the right gear has the codes, and the support braces need the inputs changed or something.
The landing gear coding is relatively easy. If I have time over the next few days I'll add the landing gear codes for you (it's pretty easy for me, plus the codes are already written).
This looks pretty good! I have a few recommendations which could make it even better. The slats could go with the flaps, as is on a real plane. Adding some funky trees code to the landing gear would also make it function a little better, especially on extension.
If you're not sure about how to make the slats extend with VTOL down, then click the button next to the "invert" label on the settings for the flap rotators, to make both the flaps and slats work with VTOL up.
Do you want the HUD to be invisible when off and visible when on?
I have no idea why I was tagged, and also only the first 3 people in a comment get tagged. Please do not tag me on any future posts, unless I request a tag on a teaser (of which there are none for this post).
@WolfHunter9111 Ask me 3 years ago. Here's another mod with agro ships.
+1@SemedianIndustries "Hold the output forever" huh. Try looking at the code for the SWL-10. Its autopilot controls (and other adjustable values) use once.
On the topic of wingflex, what I'd do is output the liftForce from the physics wing on each side and then scale that number down and use it in the rotators. It allows for real wing flex taken directly from the lift force of the actual physics wing without a huge line of code.
Amazing plane! I just tried it out, and every switch does in fact work. I have some recommendations to make it even better:
- Make the buttons for the autopilot once instead of toggle
- The wings excessively wiggle when I roll hard
Other than that, there aren't any issues.
Keep up the good work!
hmm I found some seats to put in a full interior for the SWL-120. Might even make them functional. Just gotta visit Nasa for unrelated reasons one sec.
Finally you posted something!
@BaconAircraft Thanks for the kind words, I appreciate it.
Let's say you have a part outputting to a variable. This part is the only source of that variable. If that part is destroyed, every single line of code using ANY variable breaks. A constant nullreferenceexception is also in the debug console.
+1For example, if that type of part breaks, then I have an engine stuck at full power even if I turn off AG 1, which should stop the engine.
Forum Here
@Titaninfernal1 Right, I was about to say I'd make a tutorial video.
About the wings, I can tag you, but I won't explain much.
@BeastHunter lol you have like 11 tags so far on my list.
+3@L3FTxR1GHT There is a link to the build at the top of the post. In giant text.
+1There is a script called MassEdit (found here), but it has stopped working for me for some reason.
Will every single switch work?
+4@ReturnOfJeffChandler The 717 is based off the MD80, they share the same fuselage and similar wings, tail etc. The MD80 is in turn based off the DC-9.
I know @klm747klm747 has a lot of info on this.
+2@SpiritusRaptor It means they want you to tag them on the creation when you post it.
+1@Cereal It's for my SWL-120.
+2It looks so good!
@BeastHunter Higher damper reduces bounce. No damper has more bounce.
+2Reduces the bounce. Spring strength increases the overall strength, and damper slows down the movement.
+2First unwritten rule: If you ask, then you don't.
+2Now make it work
+1meh if you have yes free time it's possible. Possible, not easy.
T
Autopilot... complicated but explainable.
+2Lemme explain the basics in a p̶a̶r̶a̶g̶r̶a̶p̶h̶ short essay. I will be using the SWL-10's autopilot (wait, you can use that!) for this example. For the SWL-120 the basics will be the same.
The first thing we want to do is make a system which allows us to select a target heading, altitude, and vertical speed. You have done this. Now, we want to incorporate our current heading, vertical speed, and altitude. Then we want to find the difference between the two and then clamp that difference, so we get a number which smoothly goes to 0 as we approach all of our targets. Something important to note is Unity works in metric (meters, meters per second) instead of imperial (knots, feet).
Another good thing - A while ago, I made several YouTube videos about the development of the SWL-10, specifically focusing on the funky trees, and I think one or two were almost exclusively about the autopilot. I'm not sure if they include all the information, but I'll make a video or two when I make the SWL-120's autopilot.
Here is the video about the autopilot. I'm pretty sure some info is missing, but let me know and I'll help you.
Oh, and here's the SWL-10. The autopilot is in the bottom few variables (the video will help), and some numbers might need tuning. I'd also recommend looking at the code in the four "physics wings" around the aircraft.
I'd also like to have a look at the funkyness in the cockpit of this regional airliner you're building.
One last thing - if you're really stuck, then I'd recommend waiting a month or two, until I can make a video on the SWL-120's autopilot, because in that video I'll try and make sure the entire video is dedicated to completely explaining how the autopilot works, and then coding and testing it.
@Mekomara Neither did I, until I asked myself the question and started experimenting.
+3Forum Here
The devs should put it back up, or at least make it available to download somehow.
@JayAr not at all.
+1What you do is scale the wing down, not resize it. Change the scale to like 0.1,0.1,0.1. @Phoebe @JayAr
+1hmmm
@zwen Cool. The SWL-120 is mostly based off the 787 and 777, with the autopilot panel based off the 777.
If you have a couple, then upload and download them. You can delete them off the site after. If you have, say, a few thousand (like I did when I wanted to remove SP from my old iPad), then I used some third party software which could read my iPad.
@topfuel300 Just checked, instead of putting floor(A9) in the setter, put 0. I also noticed the rotator didn't work, simply put 1 (or -1) in the "max" section. Another important note is the priority. Set the priority of the variable setter (not the button) to -1, to ensure the button takes priority.
@topfuel300 Maybe send me the file so I can see for myself what is happening.
+1Have a button with the interactionType of Continuous, and then have a variable setter (in the global list) setting the variable to 0.
A doughnut or donut (/ˈdoʊnət/) is a type of food made from leavened fried dough.[1]: 275 It is popular in many countries and is prepared in various forms as a sweet snack that can be homemade or purchased in bakeries, supermarkets, food stalls, and franchised specialty vendors. Doughnut is the traditional spelling, while donut is the simplified version; the terms are often used interchangeably.
Doughnuts are usually deep fried from a flour dough, but other types of batters can also be used. Various toppings and flavorings are used for different types, such as sugar, chocolate or maple glazing. Doughnuts may also include water, leavening, eggs, milk, sugar, oil, shortening, and natural or artificial flavors.[1]: 232 [2][3][4][5]
The two most common types are the ring doughnut and the filled doughnut, which is injected with fruit preserves (the jelly doughnut), cream, custard, or other sweet fillings. Small pieces of dough are sometimes cooked as doughnut holes. Once fried, doughnuts may be glazed with a sugar icing, spread with icing or chocolate, or topped with powdered sugar, cinnamon, sprinkles or fruit. Other shapes include balls, flattened spheres, twists, and other forms.[4][5][6] Doughnut varieties are also divided into cake (including the old-fashioned) and yeast-risen type doughnuts.[6][7][8] Doughnuts are often accompanied by coffee or milk. They are sold at doughnut shops, convenience stores, petrol/gas stations, cafes or fast food restaurants.
@zwen This is very cool, and I will certainly be interested in using it for the SWL-120.
By rest, I mean the other buttons, like the numpad and vnav and rnav.
@zwen Nice! I'd love to have this system (all of it) in the SWL-120. Would it need fine tuning?
I'm also wondering, how do the rest of the buttons work? I got the altitude, heading, and speed AP working, but I'm not sure how to use the rest.
@pilotman10 What I mean is for players who can't run the main version, I will remove the fuselage and wings (leaving just the basic parts to make it fly the same as the main version) and then the cockpit will still be there.
I've added the code to the landing gear, which can be found here. Please note only the right gear has the codes, and the support braces need the inputs changed or something.
+1You have to get past the blockade of my destroyers first.
+3@pilotman10 There will be a flying cockpit version of the SWL-120.
hullage
+8The landing gear coding is relatively easy. If I have time over the next few days I'll add the landing gear codes for you (it's pretty easy for me, plus the codes are already written).
+1This looks pretty good! I have a few recommendations which could make it even better. The slats could go with the flaps, as is on a real plane. Adding some funky trees code to the landing gear would also make it function a little better, especially on extension.
+1If you're not sure about how to make the slats extend with VTOL down, then click the button next to the "invert" label on the settings for the flap rotators, to make both the flaps and slats work with VTOL up.
A
@pilotman10 Oh, I'm not doing an autopilot for this plane.
@pilotman10 It takes a while because I have a lot to do. I think a year is a little too long, I'm hoping to have this out by Christmas (maybe on Christmas). I have to finish the wings, work on the fuselage, make the passenger cabin, and then the cockpit has so many parts. For example, take a look at this cockpit and then spread that level of detail to the entire cockpit. In addition, these wings still need a lot of work, like rivets.