Search Unity

Very basic flight sim script

Discussion in 'Getting Started' started by Mikeaboutoz, Mar 30, 2016.

  1. Mikeaboutoz

    Mikeaboutoz

    Joined:
    Mar 30, 2016
    Posts:
    1
    My first post here I have been messing with unity for a while but scripting was out of my league so knuckled down and stopped playing with the bells and whistles which unity has heaps of. I tried to unravel the provided C# scripts but their complexity and intricacy left me with more questions than answers.
    Anyway after a few weeks I have come up with this most basic of basic flight sim scripts that may be of use to other beginners. You need nothing more than a Main camera, flat basic terrain for visual reference, some randomly placed spheres to fly around, the directional light and a cube turned into a flat rectangle. No other scripts or anything fancy. Just attach the main camera to the cube and this script to the cube and you're off and flying. To the admins I hope this is okay it is a bare bones basic (my first C# script) flight sim with most lines of code explained as to what they do. WASD and All arow keys are used to fly and easy to see in the script what functions are attached to those keys.. Hope this is okay and beginners get some use from it
     

    Attached Files:

    crispybeans and JoeStrout like this.
  2. Chanindu

    Chanindu

    Joined:
    May 26, 2021
    Posts:
    17
    what are the controls in it, like, throttle up, pitch up, and how do i change the controls in the script
     
  3. Chanindu

    Chanindu

    Joined:
    May 26, 2021
    Posts:
    17
    i'm telling for when i put arrow up the plane banks left
     
  4. Chanindu

    Chanindu

    Joined:
    May 26, 2021
    Posts:
    17
    and if you'd like to join my unity collaborate, (since im a beginner and i need a pros help,) you are welcome, and so is anyone, let me know if you want to join
     
  5. Chanindu

    Chanindu

    Joined:
    May 26, 2021
    Posts:
    17
    And Plz add engine physics, since it never goes forward
     
  6. jbnlwilliams1

    jbnlwilliams1

    Joined:
    May 21, 2019
    Posts:
    267
    You do realize that the original post was from 2016 correct?
     
  7. Chanindu

    Chanindu

    Joined:
    May 26, 2021
    Posts:
    17
    yes
     
  8. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    It's unlikely that you're going to get a reply from the OP as they haven't logged in for five years.

    If you need help with a script, I'd suggest asking in https://forum.unity.com/forums/scripting.12/ and explain what you've tried and what you want to get it working. It's unlikely that you'll find someone to do the script for you.