• Advertisement

Joystick for flight simulator.

Recommended Posts

Hi guys,

I am working in a flight simulator project where I am integrating HOTAS-Warthog throttle and joystick to fly the aircraft. I am using SDL_joystick to read joystick axis data and passing that axis to a flight model library to fly the aircraft. The flight model library provide physically accurate flight behaviour.

My joystick axis values are ranging from ~ negative 32000 to 32000. I am normalizing tat value from -1 to 1 before passing that to my flight model.However, I am having some issue where my aircraft showing some unexpected behaviour. When I try to roll my air craft, the aircraft change its pitch slightly. What is happening is, while moving my joystick through x axis to roll the aircraft, the joystick giving some small value in its y axis too.

Which resulting some minor pitch changes in my aircraft. I have a dead zone configure but this is not helping and I guess it is only normal that from usability point of view, an analog joystick may give out some small value in different axis even though I am not intending to move to that axis.

My question is, is there any way to make the flight experience better by removing unexpected value from the other axis that I am not moving? The challenges here is the code should be able to filter any minor y axis value if I am moving the joystick to x axis and vice versa.

Or is there any better way to achieve my goal? Any thought?

 

Thanks!

M      

  

 

Edited by Mahmud Hasan

Share this post


Link to post
Share on other sites
Advertisement

Have you tested to make sure the dead zone you configured is actually being applied? I seem to recall SDL_joystick not necessarily respecting externally-configured dead zones.

If you are implementing the dead zone in your own code, you might experiment with implementing the dead zone for each axis separately. It'll cause a slight snapping behaviour to cardinal directions, but it might work all right.

Share this post


Link to post
Share on other sites

In airplanes without flight plane auto correction, rolling actually causes the pitch of the airplane to decrease because the lift is not applied in the neutral (upwards) direction. :) This is often compensated by adjusting engine throttle and using tail elevator+rudder flaps and/or other control surfaces so as to keep the altitude unchanged.

In this case, though, it's probably the joystick's fault.

Edited by Nik02

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By Bokchee 88
      I am animator by hand, and i am doing game animation for at least 8 years so far. During the last 2 years, i came with a idea for game and maybe some day, i want to start indie game company. As i am thinking to start game company, i am also thinking what kind of value i can give to the company. For example, am experience in animation,sales(I was selling web development services, before i jumped to gaming), bit of rigging- just not for production, i am learning on the side as well. The rest of the gaming production, like modeling, concept art, texturing, i am total noob or to say better, i am no near interest to do modeling for example, don't have such a patience to do it. But before characters and things are made for animating, what the hell i am would do?
      Also, what is the ideal size of the founding team of a game company? Positions to be filled mostly are, Concept artist, Modeler/Texture artist, programmer, animator-rigger. And later would need more people to join, like more animators, programmers, sound, fx,etc.
       
      And lastly, do i need to have something,like a prototype, to show people and get them interest, or should i ask someone i know, for skill that i lack, for example, Modeling would be great, texturing and rigging, and to start all together from scratch?  
    • By Terry Jin
      Hi everyone! 

      I am from an indie studio that has received funding for our concept and is ready to create the next generation 2D Pokemon-inspired MMORPG called Phantasy World. This ad is for a volunteer position but hopefully will transition into something more. Our vision is to create a game that draws inspiration from the series but is dramatically different in both aesthetics and gameplay as the work would be our own.
       
      We are hoping that you can help us make this a reality and are looking for game developers familiar with the unreal engine and would be happy to work on a 2D top down game. Sprite artists are also welcome as we are in desperate need of talented artists! Join our discord and let's have a chat! https://discord.gg/hfDxwDX

      Here's some of our in game sprites for playable characters while moving around the game world! Hope to see you soon!
       


    • By Karol Plewa
      Hi, 
       
      I am working on a project where I'm trying to use Forward Plus Rendering on point lights. I have a simple reflective scene with many point lights moving around it. I am using effects file (.fx) to keep my shaders in one place. I am having a problem with Compute Shader code. I cannot get it to work properly and calculate the tiles and lighting properly. 
       
      Is there anyone that is wishing to help me set up my compute shader?
      Thank you in advance for any replies and interest!
    • By Katie Byrne
      F.OB: Forward Operating Base is a military themed base building and resource management game.

      I am currently about 6 weeks into development. still implementing core game mechanics. The game is playable in a basic sense right now but there are no objectives or missions or anything motivating really lol. 

      I have been inspired by games such as prison architect and rimworld. both in visual style and general gameplay ideas. Here is a quick 2 minute video i put together that hopefully communicates the general feel of the game and what gameplay is like. Any feedback or criticism is welcome
       
       
      I have been keeping a development diary on my youtube channel and i hope to have more developments on this project very soon. 

      UPDATE FEBRUARY 2018 - DOWNLOAD LINK FOR BUILD 0.38 AVAILABLE
      So i decided to upload the current build. hopefully get some feedback.

      Its still incredibly incomplete and poorly documented so please feel free to ask me any questions about how to do tihngs. I am working on better documentation and more intuitive interactions.

      Any feedback would be a huge help. positive or negative.

      https://drive.google.com/open?id=1WpgO5h1nHyTh5AGYX7kxeC9qnDZ_ByAX


      It's just a zipped Unity build. simply unzip and run the .exe no need to install anything

      Oh yes, there will be bugs  but please let me know if you find any and i'll do my best to fix them 
    • By Swift Katana Studios
      Do YOU play Horror Games; if so WHAT is your favourite and WHY?
      Hello! I want to develop a Horror Game for PC and Consoles, however, I need to understand WHY people enjoy playing Horror Games. 
      Here's a list of Questions:
      What's your favourite Horror Game and Why? What environment scares YOU the most? What Creature/ Enemy scares YOU the most? Do YOU like Maze's/ Labyrinths?  Do you enjoy Puzzles/ Riddles? Thanks for taking the time out of your day to read this topic, I appreciate it!
       
  • Advertisement