I am new to the Unity Forum and would like to send a “Hello” to you all.
A few days ago I got aware that the Unity Engine is now free and that is absolutely fantastic.
I have a newbie question and I hope you can help me answering it. If this has been asked before, it would be great if you can just point me to the relevant thread. I did a search already though.
I am very interested in making a small flight simulation, which could be used as a procedure trainer. I am an aerospace engineer and a pilot and was always interested in developing my own flight sim, which I can use when I am not flying. Unity might give me the chance to do that.
The questions I have are the following:
Would the Unity Engine allow me to code my own aerodynamic forces. I would like to use aerodynamic data tables, in order to interpolate aerodynamic coefficients, depending on the flight condition. With the help of these I would calculate the forces acting on the aircraft and so on. Would Unity allow me to do that?
Is it possible to code realistic aircraft system behaviour. Basically the question is, can I code my own functionality, using something like C#?
Is it possible to code something like a complex display, which displays different things, depending on the mode etc.?
Thats all for the moment.
With respect to my background:
I am an aerospace engineer
I am a pilot
I am proficient in C/C++ coding
I have experience with 3ds max modelling
Would be great if you have a few answers for me and tell me, if Unity is the right engine for me.
Unity primarily handles the boring/hard low-level stuff like drawing 3D objects on the screen and so on. (A bit of an understatement but sufficient for the point I think…) The rest is up to you.
That sounds awesome. I think this place will become a new home for me then, very soon.
Just ordered the “Unity Game Development Essentials” book, in order to get myself familiar with the engine, besides the great stuff which is already available here.
I am really excited about all that. I bet you can tell
Do you know, if the Pro Version was used for this game or can all this be done by using the Free Unity Version (like procedurally generated cities, trees and terrain)?
I will start to get familiar with the free version and then I might upgrade to the Pro version if required.
I have a few more. Sorry for all these newbie questions, but I am trying to get a feel for the engine.
The Simulator will be from the pilots perspective, so basically the eyes of the pilot will be the camera. Do you know if it would be possible to control the camera by an external program like TrackIR (hardware IR headtracker) via an interface?
If I build a 3D cockpit with switches etc. would it be possible to make it fully clickable (moving switches and so on) via the mouse and/or keyboard?
If I would be using the Pro Version, I read that I can use externally build C/C++ plug-ins. Would these plug-in functions be called “real-time” with every Update() call and can I control how often (times per second) a certain external function is called?
1. The Simulator will be from the pilots perspective, so basically the eyes of the pilot will be the camera. Do you know if it would be possible to control the camera by an external program like TrackIR (hardware IR headtracker) via an interface?
Depending on your skill level, yes this is possible. I’m not familiar with TrackIR, but search the forums for threads on custom input devices and you might find some help there.
Absolutely. You can make the buttons in your 3D model “click-able” and/or set up custom keyboard, mouse and joystick buttons for this.
Does this mean, that the scripting functionality basically gives me the power of coding anything I can think of, just like “normal” coding?
I just had a look at the NeutralPoint website. There is a SDK available for their Headtracker TrackIR. If you get the SDK, they will provide a .dll file, which incorporates all the functions you can use.
I guess that means I would need external plug-ins to communicate wit these functions right?
Well, they are offering this SDK just to developers who want to use this SDK for commercial and serious projects. So I still have a way to go, before I will reach that point, if I ever want to go commercial.
Yes…you could write a game engine with Unity (if you were kind of insane…). Some things are more appropriate than others; you could write a word processor in Unity like someone was asking about in other topic, but that’s not exactly optimal.
I am currently also checking out the Unreal Engine (UDK), in order to see who gives me most flexibility and functionality for the things I want to do.
Currently I have no favorite, as I am just collecting information.
May I ask a few more questions:
Is the new UDK DLLBind functionality basically the same, as the C++ plug-in funtionality, offered by Unity Pro?
I am not trying to re-create a new Microsoft Flight Simulator. Just a realistic training simulation for myself and the terrain area covered will probably not be larger than max. 50 miles x 50 miles.
Can the Unity Engine handle such “large” terrain (compared to a FPS) and could I use photo-realistic textures, to texture this “large” terrain?
My basic advice for making a flight simulator featuring airplanes… create a reusable aerodynamic “Surface” component, which can be used for wings if fixed, and ailerons/flaps/whatever if you rotate/move them dynamically based on input.
So basically a normal fighter airplane would probably feature around 10-15 of these aerodynamic sub-gameobjects. 2-4 wings, 2 ailerons, 2-4 rear ailerons/wings, 1 tail, 1 rudder, 1-2 for the “nose” (for some rotational resistance).
The component works by examining its local velocity (based on parent RB component) with regards to its up vector. Using some plane projection it then calculates (using math of choice) what kind of force it should apply to the rigidbody as a result of it moving through the air. This force which is applied at the location of the component game object, will cause acceleration and/or rotational acceleration on the rigidbody.
See attached screenshot for an illustration, taken directly from my game project view. All the yellow transparent surfaces on the airplane are gizmos representing aerodynamic “surfaces”. It’s a very simple concept, but it works well enough for believable flying things in my opinion. It can easily be extended if you need more complex dynamics.
I mostly use this component for the missiles in my game.
thanks for sharing that information. I had a similar approach in mind. My dynamics need to be a little more complex, because I want to recreate the correct dynamic behaviour of the aircraft I am flying, but that shouldnt be a problem.
I really like your project and had good fun with it so far.
Maybe we can exchange our experience from time to time.