Search Unity

UnityFS - Flight Simulation toolkit

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

  1. blpfaff

    blpfaff

    Joined:
    Sep 10, 2013
    Posts:
    6
    When I test it, all control surfaces respond, just no forward movement.
     
  2. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Ok that's something at least, might be a dumb question, but have you an ignition sound file attached for engine startup.
    You need to hold down the I key till startup plays the ignition start file before engine runs.

    You can assign the sound files from the demo to test.
     
  3. blpfaff

    blpfaff

    Joined:
    Sep 10, 2013
    Posts:
    6
    I have imported and saved a custom airfoil. I am having a problem scaling it. When I adjust one of the scale controls, the numbers change but I do not get a visual change in the Scene. Not sure what is going on or what I need to do. I noticed this same behavior when I import an airfoil from the Library.
     
  4. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Blpfaff. He has video tutorials on that. Check the website/YouTube channel. I was able to get a A-10 up and get flying watching the videos.
    Hope you get it working.
     
  5. blpfaff

    blpfaff

    Joined:
    Sep 10, 2013
    Posts:
    6
    Has someone used any kind of high performance jet in UnityFS? If so, what settings did you adjust to increase the overall speed? If anyone has done this with say an F-15/F-16 would greatly appreciate it!!!
     
  6. Cjmarkham

    Cjmarkham

    Joined:
    May 30, 2014
    Posts:
    41
    I did it with an F14. I can't remember the property names but it was something like max torque that I changed.
     
  7. blpfaff

    blpfaff

    Joined:
    Sep 10, 2013
    Posts:
    6
    You wouldn't mind zipping that project and sending it to me would you? It would be a great model for me to follow.
     
  8. blpfaff

    blpfaff

    Joined:
    Sep 10, 2013
    Posts:
    6
    This was asked not to long ago, and no response was posted, so I will ask. Is it possible (and if so how) to start unityFS with aircraft already in the air going at a certain speed?
     
  9. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Hi Chris, any update on the Helicopter add-on?

    @blpfaff This is possible you would have to initialize the engine running variable to true. I did something similar before using playmaker to have an AI autostart the engines, had also modified it to allow multi engine support for separate engine startups.
    If I remember correctly while developing it I had a checkbox on the playmaker script that when enabled bypassed the engine startup so engine was already running.
    Not sure if I still have the playmaker scene still, but it is possible.
     
    Last edited: Aug 17, 2014
  10. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi All,

    Thought I'd post up what I've been doing lately, and to show that UnityFS can be used with pretty unconventional layouts..

    Interestingly, the CofG needed to be quite a long way forward, so the design of the jet doesn't really match the simulated weight distribution. I'd imagined the elevators would provide a degree of lift, and I'm not sure that's happening in the implementation. It does give me the idea though, that you could greybox out crazy Crimson-Skies esque planes in UnityFS, and then invent a design around that bearing the necessary CofG in mind, so the final concept would be more feasible.

    All-moving elevators and rudder work beautifully!

    Description of the design itself is here


    TartarugaVolante05.png
    TartarugaVolante08.png
    TartarugaVolante09.png
     
    John-G likes this.
  11. UnityFS

    UnityFS

    Joined:
    Feb 10, 2013
    Posts:
    127
    Great job! :) Nice to see people exploring more unusual designs with UFS. Would love to see a video of how it handles!

    RE Control surfaces - the control surface angle affects the angle of attack for the whole wing which in turn adjusts the lift and drag properties. The area is also included in the lift calculations for the wing section so you should get fairly accurate results. :)
     
  12. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi,

    I managed to get more lift off the rear surfaces, the final C0fG setup is still slightly fudged but closely approximates the feel I'm after. I was aiming for an energy fighter, think the flight profile of a heavier, draggier, more powerful ME-262.

    I play quite a lot of Rise of Flight, and I love the way you really have to work for altitude, and then maintain energy once you've reached it- here the aircraft wallows at low speed, but is pretty perky once you can employ the energy reserves you've accrued. Definitely don't want something you can just yank back on the stick and rapidly climb from a standstill.

    It also had a pretty lethal tendency to spin after a stall, which I fixed with washout as seen in the video.

     
    John-G likes this.
  13. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Further to the above, I wonder if I might make a few feature requests, or at least ask if there is any current way of achieving the following;

    i. Wind simulation- I have scenery that would cause fairly strong wind regions in reality. I also have landing approaches that are difficult without a headwind. Something like a sphere collider set to trigger, with a maximum wind speed and direction at the centre would be ideal. This would mean landing on moving carriers could be more dynamic for example.

    ii. Basic autopilot- I've used the simple aircraft waypoint controller from the beta standard assets, but would love to do something similar with the more accurate UFS flight models. Simply setting a target location, and automatically steering the aircraft to follow it would be a start, I can then move that target around as suits to approximate AI. Ultimately I'd love air combat manoeuvres to be conducted by AI but appreciate that's probably far outside of the scope of this asset.

    iii. Positive and Negative max deflection angles for control surfaces. My jet is easy to put into a flat spin with unnecessarily excessive negative elevator, but needs all the deflection I can give it for positive elevator.

    Cheers,

    Nick
     
    Last edited: Sep 21, 2014
  14. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    looking good ddnharris :cool:
     
    Karearea likes this.
  15. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    This looks like a great tool to have.

    Do you have a list of controllers that this asset works with? I have not seen too much discussion on what most of the developers are using with it.

    The controllers that I was thinking of specifically are CH products (Eclipse Yoke, Fighter Stick and Pro Pedals). These controllers are supported in Rewired (new advanced input for Unity - in the asset store) which is what I would like to use in conjunction with your tool.
     
  16. TutorialNom

    TutorialNom

    Joined:
    Nov 2, 2014
    Posts:
    2
    Can you make the plane damage when it crashes.
    So ex. when anything on the plane(ex. the nose) touches a object (any object). Something happends.
    Ex. when the speed is very fast, it explodes, and when it's like 60kts, it looses something on the nose, and if it's like 90 it looses a wing or something. And i don't know if you made it, but can you add like 5+ planes to choose from, and make it easy to make a working plane from a blender made plane 3d object? And btw. when i tested the demo, and turned off the engine. The plane where still in the air and the speed was around 70kts. Can you fix that bug?

    If you do atleast 2 things of what i wrote, i will buy the toolkit!
     
  17. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,689
    Some clever guys invented scripting to make that possible for everyone

    Setting up planes is extremely easy with UnityFS, watch some of his tutorial videos

    What do you expect? Turn of engine and it goes to 0 kts while falling down like a stone?

    Don't you think he should deliver it with some prepared full games so that it is ready for sale?
     
  18. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I just bought UFS (I've seen it before but as a student money is tight, so the sale was what really pushed me to buy it =) ) and I'm totally loving it.
    I've for the longest of times dreamt about making a ww1 fighting game, and I've always been fascinated with biplanes.
    I've attempted to write my own flying systems, but I've never gotten anything that feels even remotely right xD

    It took me 2 hours to make my first biplane. First using the tutorial (which resultet in a craft that would just loop de loop ad infinitum), then tweaking and tweaking until it felt good. And while I have no idea if my engine settings are good (I couldn't find the rpm, force etc info on the Clerget 9B engine which is what the Sopwith Camel uses), it at least feels sort of right.
    Anyway I was supposed to have been to bed like erhm.. 2 hours ago. G'night folks xD
    Thank you for making such an awesome framework!
     
  19. UnityFS

    UnityFS

    Joined:
    Feb 10, 2013
    Posts:
    127
    Glad you are enjoying it Mr Logan :)
     
  20. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    Hey folks , I Just bought Unity FS, Terrain Composer and the WWI Plane Pak models from TakeoverDsgn. Just started with the videos and it is a lot of fun. I agree it looks like a great package. I am a big fan of ROF but wanted to craft my own game (one on one dog fighter) so this gets me off the ground in that direction.

    UnityFS are there any tools to export and import settings for a specific model so we can share setups without having to share purchased Models?

    Is there an engine setup video or that's pretty straight forward?
     
  21. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I seem to be getting a whole slew of these error messages in version 4.6b

    "UnityEditor.Undo.SetSnapshotTarget(UnityEngine.Object, string)' is obsolete: `Use Undo.RecordObject instead' "

    9 in total. I know they aren't really important, but I just thought I'd report it anyway. =)
    That said, I'm currently working on a problem. Many biplanes had trouble with feeding fuel into the engine in specific positions (like when flying vertically), the engine would lack fuel and simply cut off. and when they then levelled off I'm guessing the force of the air moving over the propeller would restart the engine.I really want to do it without changing the current aircraft code, so I can update it later and expect everything to just work.
    Currently I'm just setting the engine to either on or off through a custom script. Is this the best way of doing it, or is that in fact a rather ugly way of doing it?

    You can try my creation so far here:
    https://dl.dropboxusercontent.com/u/6338532/WW1 Web/ww1 web.html
    Just fly straight up and the engine will cut (I want to add some coughing sounds to it, but I haven't gotten around to it yet).
    Also take care in flying too close to the AckAck north west of the hangar ;)While the damage is currently hardcoded, it will chew you up and spit you out! Anyway, I'm loving this tool, my only regret is that I couldn't afford it sooner :D
     
  22. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi @Mr.Logan

    Nice one! I've been setting the engine like this in my project (using Playmaker though), seems to work ok. You need to incorporate a blip switch in this way too! That ack ack is murderous..

    @UnityFS

    I've been working on integrating the new MegaFlow asset to simulate wind in my game, perhaps there could be some potential for the two assets to work together in an elegant way? Thread is here
    Interested to hear your thoughts on the best way to affect an aircraft with a sampled vector3 representing the flow field value.

    Cheers,
    Nick
     
  23. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    @ddnharris

    I see I need to do some more reading on biplanes, while I've always been fascinated with them, and have played loads of games with them (starting with dynamix's red baron back in the 90'ies) I'd never even heard of the blipswitch. I'm not yet sure how arcady vs real I want my planes to actually be, but blipswitch from what I've just been able to surmise is probably one of the things I do want, overuse causing engine fire.. not yet sure xD

    What sort of game are you making? =)

    Oh and yeah, the AckAck was just a tech demo for my self. I wanted to be sure that simply degrading wings during runtime would work as I hoped. And it did. Even with both wings on one side completely blown off, I still managed to touch down (barely). Which is what I was going for. =)
     
  24. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    My own idea btw. is a sort of trading game, mount and blades, sea dogs, caribbean tales, etc. but in a steampunk setting where in stead of armies or ships you have an aircraft that can be traded and upgraded.
    Currently I'm just playing around with demoing tech and stuff like that. =)
     
  25. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Yeah, Rotary engines (referring to the Clerget et al, totally different to those in an RX7!) really had a profound bearing on the flight envelope of early aircraft, interesting to read about. The whole crankcase and pistons rotated around a fixed crankshaft, acting as a flywheel, so you'd really want to find a way to model the severe on/off torque effects of that arrangement to achieve the 'frisky' handling of the Camel!

    Last year I visited the hangar of: http://thevintageaviator.co.nz/topic/projects/aircraft -Really fascinating. They're built like beautiful old yachts, incredibly elegant. Have to say the Bristol Fighter is my favourite.

    My own project is currently in silent running, but is fantasy based, with realistic physics, and a gliding-based core game loop.
     
  26. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Heh, yeah. I know a little bit about rotary engines (not a lot, but at least a little). I know that the camel was absolutely terrifying to the enemy planes when it was first released, simply because it could turn on a dime (at least when turning to one side, the other side not so much), due to the torque being applied by the entire engine rotating. That sadly is also why as many pilots died in "non combat situations" as they did during combat (though it was still a very successful aircraft).

    Sounds awesome. I've always been fascinated by biplanes (as I mentioned), so I'm kinda jealous ;P
     
  27. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551

    Are you using Unity 4.6 Release Candidate 1 (4.6.0f1)? I just picked this asset up but have not tried it out yet in 4.6 only in 4.5.4
     
  28. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I'm using version 4.6.0b20 but I used the wrong term, what I meant was warnings. not errors.
    The pack still works flawlessly, there are just used some stuff that is obsolete and will be phased out sooner or later.
     
  29. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I was wondering, I want collisions between aircraft and aircraft, between aircraft and terrain and between aircraft and other objects. However I look at a wing like this, and the collisions would just be wrong.
    http://prntscr.com/55yvn3
    My aircrafts fly fairly slowly so it'll be noticeable. I'm thinking that I can either just deactivate them during runtime, or put them on a different layer, etc. (I first tried just outright deleting them, but the Wing script requires them, so it complained loudly xD

    But from what I can see the Wing script only ever uses them in the Start method, is this correct?
    And what would you suggest I do? I'm planning to use either mesh colliders or just primitives that are dragged and rotated so they match the geometry.
     
  30. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    You need them for the rigidbody to have the correct inertial response. I remember there was a way to adjust the colliders independently of the blade element, possibly try editing scale on the collider component?

    My own solution was to have a 'static' folder which is activated when I deactivate the main aircraft component and dynamic elements (including box colliders), and set the rigidbody to kinematic (on exiting the aircraft). It's just a mesh collider set to static, which matches the model. So you can clamber around on it, but when the aircraft is on, it uses more efficient box colliders.
     
  31. ZerkyWerky

    ZerkyWerky

    Joined:
    Apr 2, 2009
    Posts:
    129
    Just got this. Works great but really need flaps. When are flaps coming? Is there a way to fake flaps?
     
    Taff-in-Exile likes this.
  32. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Thanks @ddnharris I'll look into that.

    @ZerkyWerky
    You need a flaps script, that controls a pair of control surfaces (your flaps) and then give it manual input instead of input manager.

    For example, 'f' to toggle flaps
    So

    float flapLevel = 0;

    void Update(){
    if(input.getkeydown(f){
    if(flapLevel = 0)
    flapLevel = 1;
    else if(flapLevel = 1)
    flapLevel = -1;
    else if(flapLevel = -1)
    flapLevel = 0;
    }
    wingFlap.Controller.SetManualInputMinusOneToOne(flapLevel);
    }


    Something like that should do it. Then you just play the audio effect, and instead of setting it directly you do some tweening (for example lerp)
     
  33. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    A flap extends the wing and increases drag, it doesn't just animate. I've only just started using uFS so I don't know if you can enable/disable wings at runtime. If you can, you might be able to fake the increased lift by enabling an additional wing when the flaps are deployed. The simulation should increase the drag auto-magically?

    I wrote my own simple flight simulator last year. I'm a "just get it working" kind of coder so it's pretty difficult to extend. :) (I'll learn one day.) Anyway, uFS is great in that aspect, but I have some questions I hope you guys can help with.

    I modeled and rigged a Fokker Dr. 1 tri-plane. Does the roll rate and responsiveness depend entirely on the control surfaces? Meaning - if I model the control surfaces and wing area like the original aircraft, am I getting a roughly accurate flight model for how that aircraft actually performed?

    I know the general performance depends on the wing area and loading. If I modeled a Zero and a P-47 - would the differences in their architecture show in uFS? For example, could my Zero turn circles around the P-47 through the simulation, or would I need to fudge the handling?

    Finally - the engine. I see it has a force at max RPM. Can I get an accurate simulation by tweaking that value at runtime to match the performance curves of aircraft?

    Just wondering how much fudging I have to do to get something to roughly match its real-world counterpart.
     
  34. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Away from my laptop, so can't confirm, but could you make a duplicate of your airfoil, increase the lift/drag values, and replace it at runtime to simulate the effect of the same wing with flaps down? Obviously you wouldn't get the progressive effect of flaps in transition, but it might be a decent enough fudge. You could even make a number of modified airfoils for each flap detent.

    I've managed to simulate airbrakes to a reasonable extent by simply changing the rigidbody drag value, but a better flap solution would be fantastic.
     
  35. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Oh, and you could activate/deactivate wings at runtime I think- that would be a better solution actually!
     
  36. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    You can do a lot of things during runtime. Deactivate, reactivate, scale, rotate, reposition etc. (I know because I've tested it) (I actually thought that flaps were just semi-fixed control surfaces, if that's not the case you should be able to simply scale a wing piece to fit)

    As for the question of the zero vs the p47, I haven't tried making them however the difference in architecture would be noticeable during flight. I have two crafts that are fairly, but not completely similar similar and therefore handle somewhat differently.
     
  37. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Btw, a small feature I'd like to see, an engineOff sound.

    Sure I can easily implement it my self, but I'd prefer if it feels like something that should be part of the standard package.
     
  38. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks for the clarification. Are you using the latest 4.6 beta now? I see they are up to 4.6 RC2.

    Are you using a specific flight sim (e.g. like CH products or Saitek, etc.) with your project?
     
  39. Jlavat

    Jlavat

    Joined:
    Nov 18, 2014
    Posts:
    1
    Hi! I'm looking for a Unity flying scene with an Airbus Aircraft. Do you know where I could find that?

    Thank's!
    Jean
     
  40. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    @longroadhwy
    You mean to control it? I have a Logitech force3D pro xD
    But for the time being I'm just using keyboard and mouse =)

    I'm on RC2 now yeah, and I'm still getting the same warning =)
     
  41. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Yes. I was interested in what you were using to control it.

    Unity has 4.6 RC3 I just noticed. :)
     
  42. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    Does anyone know why the example scene won't work in Unity 5, I tried tweaking the rigidbody slightly which gets it off the ground without moving horizontally first. If you have a fix please share we would all appreciate it !
     
  43. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Any updates on uFS Helicopter?
     
  44. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    ditto: "Any updates on uFS Helicopter?"
     
  45. mani444

    mani444

    Joined:
    Aug 16, 2014
    Posts:
    2
    Hey everybody...
    I am using this asset for my android app.Can anyone tell me how to change camera view with on screen change view button.
    Reflected input not working... Does i need to use manual input...
     
  46. mani444

    mani444

    Joined:
    Aug 16, 2014
    Posts:
    2
    How to change Camera angle by clicking the button in unity 4.6...
     

    Attached Files:

  47. zero3growlithe

    zero3growlithe

    Joined:
    Jul 7, 2012
    Posts:
    15
    Hello, I'm having a problem with plane's "jaw"'ing, it appears to "want to" work, but instead of turning the ship horizontally permanently it offsets it a bit and if I let go of the key the plane stabilizes back to its original heading direction. What could be the problem?
     
  48. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    Does anyone know of a Unity framework to handle multiplayer specific to uFS?
     
    Last edited: Jan 17, 2015
  49. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    Has anyone been in contact with Chris since the asset store sale ended @ the beginning of November?
     
  50. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Have you tried e-mailing him directly? There is a link on his website. http://unityfs.chris-cheetham.com