Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Anyone else having trouble with flight controllers?

Discussion in 'General Discussion' started by Caetleo, Jun 5, 2023.

  1. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    I've installed several flight controllers, and for some reason, the planes just don't move. I don't think its the asset, as I've tried on numerous different flying assets.

    Unity 2022.3 I've tried Input ( Old + New + Both ) None seem to work.



    Is one example.

    I can't seem to figure out why nothing moves.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    There's a controller test panel somewhere in the system settings / control panel of Windows where you can see whether button presses and analog movements are received correctly - if you use a flight stick or gamepad for input. I would check that first unless you deal with keyboard+mouse.

    The new input system also has a way of assigning actions to the button or axis that is activated at the time you assign it. You could try that to see if it responds to the input.

    And of course refer to the instructions/manual of the corresponding flight controller asset, and try to import it in a supported version of the editor in a new project, installing just one controller asset to avoid possible conflicts with other controllers.
     
  3. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25

    I'm on a Mac, and all my other projects work fine. It has something to do with flight controller assets, Every single one of my character controller assets works perfectly, I have 4 different flight assets, and all 4 of them, the planes just don't move at all. Super Confused.
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,769
    If you have issues with particular asset store solutions you should contact the provider of that asset for support. And if none meet your needs then you probably need to roll your own.
     
  5. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    Its not just one asset, It's 4 different ones that are all flight controllers. Which in turns tells me it could be a bigger issue.
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
    Which ones?
     
  7. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,724
    What does the input debugger say is happening?
     
  9. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    I'm not sure how to use the "Input Debugger" Could you explain?

    Also I figured I'd share another video showing another flight asset doing the same thing

     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
  11. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    Okay, I will study this and find out the information and report it here. It's weird because all of my other controller assets work perfectly with no issues. It just happens to be any flight ones. Thank you for the reply!
     
  12. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    612
    It should work, out of the box, all of them.

    So maby I can help, in the example you show, 2 things jump out with the physics settings, 1) No Gravity, 2) Is Kinematic
    So the entire flight is script based and and all flight physics is simulated, most likely in the Fixed Update method.

    First, solve the error, take out that variable, 2nd double check the input, especially the axis values : Do a Debug Log and print the values to screen, using the actual controller names, again to take out another variable. Are you using a Keyboard, Xbox controller, mobile phone Gyro?

    Next what sort of collider does the aircraft have, how is it set? Is the Mass and Drag and Angular drag computed in script?

    Once input is 100% validated, we can run some simple tests, let me know if you need some debug code examples.

    p-
     
    Last edited: Jun 5, 2023
  13. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    I don't know what I'm doing here. Screen Shot 2023-06-06 at 2.59.55 AM.png
     
  14. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    415
    It feels a little like you're trying to run before you can walk and maybe relying a bit too heavily on assets.

    Do you know how to read input from a controller with code where you could write a quick script to log inputs? If not, I would study that first before trying to troubleshoot a third party asset.
     
  15. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,325
    Also, it looks like you have errors in the console. Once you get run-time errors in the console you can't really expect anything to work properly. So try getting rid of those errors before anything else.
     
  16. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    612
    the basic concept of controllers for the Flight Kit.



    and maby this?

    The CrossPlatformInput class is designed to be called instead of Unity’s own Input class, and so mirrors certain parts of the Input API – specifically the functions relating to Axes and Buttons:

    GetAxis, GetAxisRaw, GetButton, GetButtonDown, GetButtonUp

    When reading input from the CrossPlatformInput class, the values returned will be taken either from Unity’s Input Manager settings, or from the mobile-specific controls set up, depending on which build target you have selected.

    Private Message me, I'll get you started, I have loads of experience battling this type of project.




     
    Last edited: Jun 6, 2023
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
    If a device is properly supported by the new input system it will show up under Devices. I've had flight sticks that I was able to connect in Windows, were able to function in most apps, but weren't properly recognized by the new input system. You can write custom profiles to do so but my flight stick was ancient so I never bothered learning it.

    https://docs.unity3d.com/Packages/c...nual/HID.html#creating-a-custom-device-layout
     
    Last edited: Jun 6, 2023