Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityFS - Flight Simulation toolkit

Discussion in 'Assets and Asset Store' started by UnityFS, Feb 23, 2013.

  1. sleeperservice

    sleeperservice

    Joined:
    May 7, 2016
    Posts:
    2
    Hi everybody! I can see a lot of great tips in this thread, which is especially helpful since the developer is occasionally MIA. I have the creeping handles problem too (#469), but I've run into something else that I couldn't find in this forum...

    Using Unity 5.5.1f1 I imported UFS and updated the necessary scripts. Everything works well and flies when it should, but there's some wind. Specifically, there appears to be a wind blowing towards positive Z (the direction my plane faces) and I can't find the source of it. I've checked all active scripts, and there is no wind object in the scene. I've followed the tutorials on the UFS website, and used the TestSceneObjects and Basic prefabs. Does anybody know what could be generating this wind?

     
  2. Sr-Liermann

    Sr-Liermann

    Joined:
    Jan 7, 2015
    Posts:
    68
    I was think in buy this kit, but I wanna know if the developer will continue support this kit and update this kit?
    When you will put the flaps and airbreak feature, without this, i cant buy that =(
    A very nice kit, but needed it.
     
    Last edited: Feb 1, 2017
  3. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    The last official asset store update was Feb 27, 2014 which is almost 3 years ago.
     
  4. negativegeforce

    negativegeforce

    Joined:
    Sep 1, 2016
    Posts:
    5
    I was able to get everything working in unity 5.5 with the script updates. I got a custom DC-3 flying in a matter of a couple hours. Just because there hasn't been updates in 3 years doesn't mean it's no good. It doesn't need anything else. It does exactly what you would expect. It just means it's very mature software. It's the best flight sim package out on Unity by far IMO.
     
    Mr-Logan and Karearea like this.
  5. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    The original question was about if the publisher of this asset is actively updating the product. The answer from the asset store last update is obviously no. If a new customer buys it expecting more updates from the publisher the odds are quite low given 3 years have passed since the asset store has seen an update from the publisher.

    The product maybe solid and mature code base but that is not how I read the original question. I read the question if the publisher is actively providing updates. Some end users (developers) can live with the current code base but others want updates.

    Unity could be considered a mature product also. X-plane 10 could be considered a mature product also. But both products continue to get updates from their respective publishers. I am really looking forward to X-plane 11 release because of the improvements by the publisher.
     
    AlanMattano likes this.
  6. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Another thing worth mentioning is bugs, there's the wheel issue, I don't know if it's still an issue as I have a script I just attach to the aircraft and it works, but to my knowledge he wrote that he'd fixed it, and then he vanished before said fix was uploaded to the asset store.
    No doubt it's still a very powerful kit, it really is, it's so easy to use, and modify and play around with etc. it's just a bleeding shame that he has chosen not to work on it anymore.
     
  7. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    Hey guys,

    I'm trying to set-up an aircraft which has Elevons

    Any experienced uFS devs here who could help in how to implement this?

    Thanks in advance.
     
  8. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I'm not at my computer so I can't test it, but can you simply add 2 control surface scripts to the same GameObject?
     
  9. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    I tried that, but guess there an editor script that blocks out most of the functionality.
    Would really appreciate if you could give this a try.
     
  10. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I've been playing around with it a bit and I can see what you mean, it seems that the first control surface script cancels out the second one.
    I'm going to suggest then that you take the control surface script and copy it and then rewrite the input section to allow for two input methods.
    You're then going to have to do the same with the editor script for control surface (simply search for 'control surface' without quotation marks and they'll both pop up in the project view).
     
    vivalavida likes this.
  11. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    Thanks @Mr-Logan ,
    I guess I've managed to get this working.
    I've added a second Input to the ControlSurface.cs script and correspondingly modified the ControlSurfaceEditor.cs script.

    I'm just adding the inputs from the two Axes, not sure if actual ElevonMixing is more complicated than that; but I guess what I've done (i.e. simply adding the two inputs) serves the purpose.

    Sharing the code if anyone else wishes to go about doing something like this.
    Code (CSharp):
    1.  
    2. //ControlSurface.cs
    3.   [HideInInspector]
    4.     public bool isDualInput = false;
    5. //this bool is controlled via modifications to the Editor  script
    6.  
    7.     [HideInInspector]
    8.     public InputController Controller2 = new inputController();
    9. //a secondary InputController to get data form a different axis
    10.  
    11. public void Update()
    12.     {
    13. float input1 = Controller.GetAxisInput();
    14. //from the original code we have renamed this to input1
    15. //and will compute the float input after getting the resultant of input1 and input2
    16.         float input2 = 0;
    17.         if (isDualInput)
    18.         {
    19.  
    20.             input2 = Controller2.GetAxisInput();
    21.             //Debug.Log("here"+input2);
    22.  
    23.         }
    24.  
    25.         float input = Mathf.Clamp(input1 + input2, -1, 1);  
    26. //we add the two inputs, if input2 is not present its value is 0 and wont affect input1
    27.  
    28. }
    29. //the rest of the code will remain as is as everything is calculated from the float input
    30. /*note in case you want different Input curves for each axis
    31. you will have to create a variable InputCurve2
    32. and set it accordingly in the ControlSurface Editor script
    33. this wasn't necessary for my current setup hence I haven't implemented it,
    34. but should be easy to add in after going through this code
    35. */

    This being my first time working with Editor scripts,
    I've basically used the example in the Unity manual as my guideline,
    https://docs.unity3d.com/Manual/editor-CustomEditors.html

    Code (CSharp):
    1. //ControlSurfaceEditor.cs
    2.  
    3. //variables
    4. //create new bool
    5. private bool InputFoldOut2 = true;
    6.  
    7. // create Serialized Property
    8. SerializedProperty isDualInput;
    9.  
    10. //add the following to OnEnable
    11. private void OnEnable()
    12.     {
    13.    
    14.         isDualInput = serializedObject.FindProperty("isDualInput");
    15.  
    16.     }
    17.  
    18. //Add the Following to OnInspectorGUI
    19.  
    20. public override void OnInspectorGUI()
    21.     {
    22. /*this goes right after
    23. if(InputFoldOut){
    24. .....
    25. .....
    26. }
    27. */
    28.      serializedObject.Update();
    29.         EditorGUILayout.PropertyField(isDualInput);
    30.         serializedObject.ApplyModifiedProperties();
    31.  
    32. if (isDualInput.boolValue)
    33.         {
    34.             InputFoldOut2 = EditorGUILayout.Foldout(InputFoldOut2, "Input2");
    35.             if (InputFoldOut2)
    36.             {
    37.                 ShowInputAxisOptions("Surface", targetControlSurface.Controller2);
    38.  
    39.             }
    40.         }
    41.  
    42.  
    43.  
    44.  

    Hope this helps someone.

    Suggestions / feedback / corrections welcome.
    Thank you.
     
    Last edited: Apr 22, 2017
  12. rtjia

    rtjia

    Joined:
    Jun 6, 2017
    Posts:
    5
    Hi, can you help me? I import the package to a new project, load example scene and run .... engine run, Propeller is run, only one question, the plane cannt move! I cannt move it and fly in air !! Why?
     
  13. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    It's been talked about on probably half the pages here xD
    In unity 5 they updated physx which brought with it a new wheel collider, the new wheel collider however is not as easy to use which has caused many people problems, but it's not really fixable.
    However there are workarounds.
    I tried a number of different things and by the end it worked, I'm not sure what fixed it exactly, however my suspicion is that the fix that worked was adding a bit of engine torque to the wheels when the player pushes the accelerate button. Try that, and also feel free to read what others have said :)

    Oh, and there is a patch on one of the other pages that fixes a few problems too (it was never added to the asset store for unknown reasons)
     
  14. rtjia

    rtjia

    Joined:
    Jun 6, 2017
    Posts:
    5

    Thank you very much!! Logan!
     
    Mr-Logan and vivalavida like this.
  15. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    You're very welcome. I hope it worked :)
     
  16. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Thanks so much for sharing the code. I will take a look!
     
  17. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    In this "HOEditorUndoManager" script in the editor folder, there are a lot of obsoleted Undo functions.
    I try to maintain my console clean.
    Is there a workaround?

    Code (CSharp):
    1. Undo.SetSnapshotTarget( p_target, p_name );
    2. Undo.CreateSnapshot();
    3. Undo.ClearSnapshotTarget(); // Not sure if this is necessary.
     
  18. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Hello, still trying to learn Unity undo...
    This asset is giving a lot of obsolete alerts.

    But I do not understand well how to correct the warnings.

    Here is the UnityFS code
    Code (csharp):
    1.  
    2.                         // Create a new snapshot. Unity 3.5
    3.                         Undo.SetSnapshotTarget (p_target, p_name);
    4.                         Undo.CreateSnapshot ();
    5.                         Undo.ClearSnapshotTarget ();
    6.  
    I make the correction but...I'm sincerely don't know what I'm doing
    Is this correction OK? Or I'm missing something?

    SOLUTION Draft
    Code (csharp):
    1.  
    2.                         // Create a new snapshot. Unity 2017
    3.                         Undo.RecordObject (p_target, p_name);
    4.                         // Obsolete: Undo.CreateSnapshot ();
    5.                         // Obsolete: Undo.ClearSnapshotTarget ();
    6.  
     
    Last edited: Aug 31, 2017
  19. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85

    There's should ideally be no need to touch those bits of code, and you can safely ignore them if it's just warnings.
     
    Last edited: Aug 31, 2017
  20. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Thanks, @vivalavida but ignoring is not a real tangible solution. I try to maintain my console clean. UnityFS is giving me 9 warnings because of this. If each plugin gives 10 warnings, became a real problem trying to look out the new ones. That is the reason why I try to maintain the console as clean as possible. I modify the code as shown earlier but I do not know what I'm doing here. I did not understand if CreateSnapshot and ClearSnapshotTarget are included in RecordObject.
     
  21. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    Hi, the HOEditor scripts that are giving you warnings are not directly related to the UFs, they are used only to manage the undo/redo functionality of (UFs) plugins inside the Unity Editor.
    http://wiki.unity3d.com/index.php/EditorUndoManager

    I'd recommend that you search elsewhere on the Unity forums to correct these warning.
     
    Last edited: Aug 31, 2017
  22. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Hey, thanks for pointing that out.
    Yes, I know that. I have done that in 2014. And also, make a better specific question in a new thread in 2014 with no success. Since then, my skills as Unity programmer has improved a lot but I was not able to understand well how old CreateSnapshot works.

    I'm still looking for a solution. I still think is useful to other UnityFS users to have the solution here to this recursive warning since is a problem that is directly related also to UnityFS.That is the reason I post my solution also here. UnityFS users can be grateful for my draft solution, but/or not be so happy if it does not work well...
    For example, I notice that the If you change the input to Rewired, it does not reflect the wing mirror. So you need to double check all mirror objects.

    I do not know if there are hiding bugs taking out the piece of code that contains CreateSnapshot and ClearSnapshotTarget.
     
    Last edited: Sep 1, 2017
  23. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    There is is a bug in ModifyWingGeometry(). The hinge is calculated incorrectly.

    Look at how the wing geometry is drawn after applying rudder on your vertical stabilizer, it gets all warped.

    I fixed it, but there's another issue i have. on a vertical stabilizer you will find that the forces applied, when you apply rudder, point in different directions across the segments. The end result is that when you try to yaw it mostly just rotates as if you had applied Aileron

    For reference the vertical stabilizer parameters: (It's the twin engine sample plane)
    Root hinge offset: 40
    Tip Hinge offset: 66
    Wing tip sweep: -0.5
    Width: 50
    Angle: 0
     
    Last edited: Sep 11, 2017
  24. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Interesting: Hi @TheJavierD, well come to this forum! Thanks for pointing that out. Yes, rubber produces a torsion and in general, (I presume that) rudders are not hi aspect ratio and very tall because of this. I think I also understand what you are talking about. If you rotate the moving control surface of the rudder, it does not produce lift [the rudder is not working]. Consider this, in UnityFS If you fly side slip, the wing does not generate side vector force drag. Since months I'm trying to calculate the real AOA vector and AO side slip vector and then I make the calculation of L & D in a separate function for each point. In this way, I'm sure of what I'm doing. But takes a lot of computational resources because is calculated for each point and the equation is very long. The way UnityFS calculates the final Lift and drag is a draft approximation of calculating the roll vector and distance from the center, etc...and only for the 2d section along the chord; is draft simple for an efficient low CPU usage in a game. And then you got a vertical wing you can be in the paradox that generates no vector lift. I think also UnityFS do not generate much lift if you apply rudder. I notice this strange way of calculation the lift drag equation in a lot of old game simulators and is the reason I decided to start making a better simulator. I make experiments putting vertical wings and I expect that it must be pushed by the wind, but this does not happen in old games. There are a lot of inaccuracy and there are a lot of ways of calculating the simulation in general. For each one is the level of accuracy you what to put out in your final product [Idially is better to calculate it from the mesh]. I did not look how the additional lift is applied using the control surface script, but I presume is just changing the AOA and not making the equation as The Theory Of Wing Section suggest at chapter 8 for calculating a high-lift device [but I can be wrong here in this point. I need to double check]. Also, there are missing parts. For example with the control surface script is missing the flap fix position, trim fix positions, etc... that you can achieve using the slider axis in fix positions in another more appropriate input script.

    As a simple solution, you can just calculate and apply the lift just for the rudder.

    I understand your delusion but considering it was made in Unity3 as an example of what is possible to do with customs inspector... is not bad. I think is a good example. I do not think that this asset deserves one star as you point out. Considering is the best asset in the asset store of its kind and nobody is claiming is a perfect asset. We all try out to point out what is missing and include fixing info as you have done.

    PS: Look if your Wing Tip Angle = 0

    Here is my setup for the vertical stabilizer of the twin.

    upload_2017-9-12_10-35-14.png
     
    Last edited: Sep 12, 2017
  25. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    If you look at the forces applied on the Vertical stabilizer while you are going left or right you will see what i mean. Let me explain in mode detail:

    Let's say you have a vertical stabilizer with 5 segments and you want to go LEFT.
    The forces applied through the wing will point:
    1) right
    2) right
    3) left
    4) left
    5) left

    So you see, it's inconsistent, it prevents you from turning as much as you should and these also cause a torque beyond what a vertical stabilizer would normally do.

    I'm no aerowhatever expert, so i may be wrong but it seems like that should not happen.

    BTW you have to draw the forces, i don't think it does by default. i'm doing this at the end of FixedUpdate()

    if (debugDraw)
    {
    Debug.DrawRay(liftDragPoint, liftForce, Color.magenta);
    Debug.DrawRay(liftDragPoint, dragForce, Color.yellow);
    }
     
    Last edited: Sep 13, 2017
  26. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Sorry, I can't make a debug following your example now .But try to follow my inspector parameters that I pass you earlier. An let me know if this helps you.

    Same general questions for debugging:

    • Are you using Prop Wash or Ground Effect in you Vertical Stabilizer game-object? [must be false]
      you must take out this component.
    • Your list 1 to 5 looks inverted. Are you inverting the surface direction or rudder axis direction? [must be true]
      You need to active the boolean "Invert Surface" in the Control Surface script component.
    • Is your Wing Tip Angle (washout) 0°? [must be true]
      the angle must be 0
    • How much force are you getting from your tip right vectors n°1? [must be close to 0]
      you must debug how much force are you getting from the negative lift force and must be close to 0.
    • Are all this 4 o 5 section moving planes panels? [must be True]
      If you apply control surface to only the first 3 sections, when is rotating, you get different angles and so the closer to the tip, where there is no rubber control surface, the angle and the lift is a negative low value. because the lower section close to the base is producing more lift.
    • More code question: Is UnityFS calculating well lift distribution along span?
      I do not think UnityFS is calculating the lift distribution. Probably UnityFS is calculating the force by looking the center of pressure or center of gravity.
    • If you move the CG (center of gravity) or CP (center of pressure) is affecting the direction of the vectors?[must be false]
      try to move the c.g. and c.p. deep down or deep up and look is the vectors change direction. If they do you are closer to finding the bug.
    A wing has different lift distribution along the span. At the tip of a wing (or rubber), there are wingtip vortices that produce the induced resistance [when rubber is applay]. And on the tip, the lift force is = 0 and the direction can be negative because of inducing resistance and wash out. So your wing tip washout angle must be at 0.
    I presume that the only strange value that you passed in the list can be number 2. And in general look like inverted.

    In your example:
    First add movement to your airplane, by applying force to the rigid body of the airplane. Do not let it fly. just rolling in the runway. In this way, you know that the angle of the air flow is not influenced by the changing directions or rotations.
    Now apply yaw to the rudder in a way that you get lift force (probably you must invert the direction?)

    if your yaw rotating left (anti clock from top view) as your example. the front wheel must not apply rotational direction. the wheel must not turn [only for the experiment]. because if it turns, is influencing the wing direction in the tail.
    The rudder is making a right force especially at the root base
    I presume:

    1) left <-------<<< is not important because the lift must be around 0. if is not then there is a bug in the script or omitted
    2) left <--------<<< strange or bug
    3) right <--- ok. how much force?
    3) right <--- ok. how much force?
    3) right <--- ok. how much force?
     
    Last edited: Sep 13, 2017
  27. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    @TheJavierD When you apply rudder yaw, the airplane starts rotating in Unity Y axis. The wing has dihedral and in this case, the dihedral is positive.The positive dihedral produces a dihedral effect. So when you apply rudder, the aerodynamic dihedral effect produce a rotation in Unity X axis. This rotation in X is producing vectors rotation effect on the rudder tip.


    This is correct.

    1) right
    2) right
    3) left
    4) left
    5) left

    If you make the wings anhedrals (with negative dihedral), you obtain the opposite effect.

    For debug the rudder vectors, try to run the airplane without steering long the runway at a small amount of speed. Or try neutral dihedral.
     
    Last edited: Sep 14, 2017
  28. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    I have been using UFS for years now... ;)

    As my project is beginning to mature I have a terrible fear that a Unity update will suddenly kill UFS off since Chris seems to have permanently dissapeared - anyone know what happened??

    @AlanMattano: You seem to be very active here - do you think there is any chance UFS will be lost / deprecated?? If source code is available why not have somebody take over UFS development if possible and Chris Cheetham would allow it?? :)

    Jesper, Denmark
     
  29. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    UFS overall is working well. I do not know what happened to the author. At the moment I'm so active because I'm trying to include UFS into my code. And I use it as a code example for building the wings inspector.

    Unity updates try to deprecate code substituting it with other new code; clever and simple to understand. So your fear about updates is if you are not able to substitute the line of code with the new one? Here in this thread, together, we all include the modifications of updated code. As a group, we are making good in maintaining it alive. Instead of having to fear, Make specific question and probably you will get a helpful answer to the problem.

    Or your fear is that the asset store disabled it?
    I try to download and backup asset in case it deprecated. And when it does, I just update it.

    I do not think that take over UFS development and passing over Chris Cheetham and his asset is a good idea. Products are nice how they are. Other better and more experienced users can make a better Aerodynamic inspector by their own and publish it in the asset store. And is not my case. I wish to finish my game...

    But yes, can be nice if there is a new and better UFSII ;) I pray for Chris Cheetham returns.

    Jesper, @broesby if you what to contact Chris Cheetham, probably this is the information you are looking for: "The team from Remex will be unveiling a completely new flight sim platform." REMEX SOFTWARE [SOURCE LINK] In England data: 07/10/2017 at 10. Probably here you can contact the team and ask what happened to Chris & UFS.

    EDIT: the author is responsive via email and facebook.
     
    Last edited: Sep 20, 2017
  30. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    @AlanMattano: Fantastic answer!! Thank you :) Actually I just found the same info myself about Remex Software ;) - not that I really have any specific questions for him now. It is reassuring that you and others are maintaining this. As a non-coding Unity hobbyist like myself I must rely on people like you - thx man ;)

    I've had a few trusted assets "run dry" before - that's wht i mean. Ceto Ocean and Silverlining Skies for instance.... Both have found replacements - and both actually still work (at least in 5.6) - but there really is nothing replacing UFS. And it is very central to the game I hope to make one day... The alternative on the asset store cannot really compare...

    On another note... I see that you are making a soaring simulator :) I really look forward to that one - do you need a beta tester? The game I want to make is overlapping yours in some aspects but still nowhere close. Don't worry. I'm not competition - I'll tell you in PM if you want..

    I have been thinking a lot about how to simulate thermal upwinds, static, ridge and dynamic soaring.... I have considered using one of the force assets - for instance Circular Gravity Force for that. Do you have any good ideas/tips in that regard.... Well, actuallly it is the whole concept of dynamic weather/wind and so on... ;) Complex topic, I know.... and cannot ever be accurate... but best approximation... Any tips would be much appreciated...

    Best wishes, Jesper Denmark
     
    gl33mer and AlanMattano like this.
  31. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Jesper, Yes you can change the gravity for an arcade casual game. But when you apply negative gravity, the lift force will be pushing down. So if you apply forces you can get the same strange effect.

    My general approach is "l Do not fake it". So you can try to apply a wind vector to the drag lift equation. :p


    if you are using UnityFS, first you can make a wind vector [Vector 3 includes direction and intencity]. In it you can simulate dynamic ridge, upwind, etc... and combine this new wind with the movement vector in the wing lift drag equation
     
    Last edited: Sep 21, 2017
    gl33mer likes this.
  32. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    Thx,.. That is a good approach... I have tried adding different kind of external forces to the flyer... But I added them to the whole prefab. I think the result is that the force acts on the rigidbody or center of gravity..

    Adding the force to the wing equation sounds more realistic... So how does it behave actually.... For instance with a strong sidewind, will the flyer act differently if banking and thereby have a larger surface exposed to the force? Which would be realistic, I suppose... Although I'm not entirely sure. Aerodynamics is complex...;)
     
  33. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    @broesby @AlanMattano Is the following thought process correct? The wind vector is a movement vector not a force. The aircraft's forces are then acting relative to the moving air mass rather than position over the ground. So banking the plane wouldnt cause the flyer to act differently in windy conditions compared to nil wind, as it hasn't exposed more wing area to the 'wind' as it experiences no wind (its moving with the wind). Same as flying into wind compared to downwind. Airspeed is constant v ground speed is vastly different.
     
  34. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    My way is:
    Code (CSharp):
    1. vector3 wind = new Vector3(...);
    2. relativewind = wind * relativewind ;
     
    Mr-Logan likes this.
  35. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    Although I do not totally understand I think you are right @blacksun666 regarding the movement vector vs. force difference. I actually asked Chris Cheetham himself years ago about wind and he said something along those lines...

    I suppose the difference between an air-moving body and a sailboat or something else "ground based" is that the ground-based is stuck to a specific spot on the ground whereby the wind acts as a force trying to push it away from that spot... In the air the flyer just moves along with the "air body"... What I do not understand though, is why birds for instance seem to vary the amount of surface they "present" to the wind - like a sail on a boat... That wouldn't really be necessary then, would it??

    Well, anyhow: I think @AlanMattano 's solution is brilliant and logical - I just need to actually pull of coding it ;) Cya, guys...

    Jesper, Denmark
     
  36. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    I was wondering if anyone could educate me a little bit here.

    The airfoils provided are meant to be used in full scale airplanes right?.

    If i wanted to use those airfoils in scaled down planes is there anything i could change in the lift/drag calculation to account for this?.

    I notice that for pretty small planes there seems to be a lot of drag. If i drop flat it's almost like a parachute honestly.

    So what I'm just doing to try to alleviate this is guessing how it should scale. So for the drag coefficient i'm scaling it this way:

    cD = cD * Mathf.Sqrt(ParentAircraft.GetScale());

    But of course, that's just a guess and certainly wrong but still helps a lot. so any help in improving this is greatly appreciated.

    Thanks!
     
    Last edited: Oct 26, 2017
  37. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    501
    I'd start by looking up reynolds numbers, the adding that to the equation. You could do it as a straight up multiplier (the ghetto way).
     
  38. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    I have been reading up on the reynolds number but i don't make the connection with scaling yet.

    All i know is that if i have two reynolds numbers that are similar then the coefficients should be correct, but when they are not similar what do i do?.
     
  39. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    501
    To be honest, you could probably get away with not using the reynolds numbers.

    Think about the 'airfoil' used by a paper plane. They're thin, and straight-ish. Start by making the wing airfoil a Naca 0900 (I think that's the one, check the tailplanes used on the example plane). You're looking for the thinnest symmetrical airfoil possible.
     
  40. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,687
    Just saw this – uFS has been removed from the store:

    uFS - Flight Simulation Engine
    Complete Projects/Systems
    REMEX Software Ltd
    Unfortunately, uFS - Flight Simulation Engine is no longer available.

    This package has been deprecated from the Asset Store. This means that new purchases of the package are not allowed and that only users who already purchased or downloaded the package before it was deprecated, are allowed to download it.

    In most cases, package deprecation happens because the publisher is unable or unwilling to support the package anymore. We suggest looking for alternative packages or contacting the publisher directly.

    If you’ve already purchased it and need to download a copy, you can do so here.
     
  41. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Doesn't surprise me, what does is that it took Unity so long to do it.
    The version in the asset store hasn't worked with Unity 5 and although a patch is available through the developers website to make it work, a new version with the patch included has never been posted (or maybe never approved) on the store.
    Hopefully the developer will finally update the package and it will be available from the store once again?
     
  42. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,687
    I don’t think Unity can remove it from the store for no reason. It looks more like uFS is official dead.
    In an interview they say they are working fulltime on Deadstick.
     
  43. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Look this page: http://airfoiltools.com/airfoil/details?airfoil=s1223-il

    If you use a small chord or a slow airflow speed, you get a low Reynolds number for example 50.000 for a Rc model. The wing of a real aeroplane has a bigger chord and hi air flow speed (much bigger Re of 2.000.000).
    Look the chart Cl vs Cd. In the x axis for Cd, at 50.000 (Rc model wing) you get a 0.04 Coefficient of drag. Using 1.000.000 Re (Small aeroplane) you get a lower drag of 0.001... A big Airplane has much less drag than a small model. You need to choose the proper Re Cl v Cd airfoil plot for the proper wing and speed if you need more accuracy. But you can avoid if you wish some accuracy by choosing just only one plot. You do not need to interpolate leaping between multiple wing cords and speed.
    upload_2017-11-13_15-34-45.png upload_2017-11-13_15-34-45.png
     
  44. Print3d

    Print3d

    Joined:
    Oct 22, 2017
    Posts:
    35
    Hi everyone!
    I'd really love to get this package, is there a way to for that somehow?
    Not for free of course, unfortunately i got here late... :/
     
  45. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,687
    It is gone so there is no chance to get it anymore unless he releases it again. Which I doubt he will. He wasn’t updating it for years, never replies on the thread and currently releases his own bush pilot flight sim instead.
     
  46. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    Hi could you please give the link to the bush pilot flight sim and/or other works related work done by him thanks.
     
  47. vivalavida

    vivalavida

    Joined:
    Feb 26, 2014
    Posts:
    85
    Hi all,
    Have to integrate some sort of autonomous flying in a project we're working on and want to stick within the UnityFS framework.

    I've looked at the Unity Standard Assets as a good starting point.

    Want to know if this can be combined with some or of AI system(like behaviour designer).

    Basically want to have flying enemies that can chase and shoot you and also want to have variations in the 'smartness' of enemies.

    Will be asking on the 'AI' forums as well, but want to get feedback from here first.

    Anyone have experience with this or anything similar? Any help will be much appreciated.

    Thanks.
     
  48. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    501
    Yes, I do use UFS with bot (AI) control.

    bear in mind your bots will have to know how to turn, take off, etc. So you may be calling for the bot to do something like robot.go(place) but below that it will have to have some way to bank the plane, then pull up, and not just rotate on the local Y axis, unless you're an ekranoplan, in which case it has to know that's the only option without getting its tip wet.
     
    vivalavida likes this.
  49. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    I use a much-modified aircraft system based on UFS, and have basic AI implemented.

    Before you start looking at AI itself, you'll need to implement PID controllers to handle the various flight controls. In my case this meant reimplementing the input to allow switching between manual and auto, and when in auto using PID controllers to maintain bank / pitch / yaw and thrust to set values. I based my controllers from this page: http://www.habrador.com/tutorials/pid-controller/

    Heading and altitude (or tracking a transform), use a higher level of PID controllers and/or trig, and in turn influence the bank / pitch / yaw targets. Once you can track a transform, you can use AI to manipulate it as a target- ie. lock it to your own aircraft etc.
     
    Mr-Logan and vivalavida like this.
  50. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    This is the game, there isn't much there though
    http://deadsticksimulator.com
     
    vivalavida likes this.