Skip to content

Added JSBSim for Unreal Engine 5, and UE Reference Application #617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
May 1, 2022
Merged

Added JSBSim for Unreal Engine 5, and UE Reference Application #617

merged 25 commits into from
May 1, 2022

Conversation

AlbanBERGERET-Epic
Copy link
Contributor

No description provided.

This project automatically build JSBSim for UE, and stages the needed Libs. Includes and Resources to the appropriate location.
Created a reference app.
Created a terrain and a runway with simple materials
Used a cleaned version of the Airliner
fixed plugin build errors with STL
created basic input axis, with a priority controller over keyboard system.
Created good Landing gears animations
Wired the aileron, elevator, rudder anims.
Simplified the keyboard-driven inputAxis by changing the scale value to -1 for the opposite key
tweaked the landing gear animation to avoid having the front wheel in the runway
Added the engine blades rotating animation
Added the D key to toggle Debug Info
Added 890 keys to switch TOD presets
Added an UMG Primary display
Moved some variables to AircraftState Struct
Added vertical speed and horizon indicator
Primary Flight Display
 - Added Heading Legend
 - Added main commands values

Added Braking logic (Left/Right/All + Parking)
Added Flaps Logic (without animations yet)

Changed key mappings to avoid Function Keys (In-editor conflicts)
Added Flaps animation in AnimBP
Checked Flaps position at start behavior
Extended the Main Gear initial extension to have wheels correctly on the ground.
With their current values on the PFD
This file is generated automatically by Unreal...
@bcoconni
Copy link
Member

Hi @AlbanBERGERET-Epic,

Thank you very much for your contribution. This is a remarquable new application for JSBSim.

I quickly reviewed your PR and I have a few questions to ask:

Could you please remove the file systems/fg-fglue.xml from your PR as it fails the XML validation test (see https://github.com/JSBSim-Team/jsbsim/runs/6225004337?check_suite_focus=true#step:5:25) ?

Also is there a way not to include the multimegabytes "assets" files in the PR as it will significantly increase the size of our repo ?

Thanks for your help.

@AlbanBERGERET-Epic
Copy link
Contributor Author

Hi @bcoconni

I reduced the assets file and provided a download link to get access to HD Content optionally.
The total size of the UnrealEngine folder is under 50MB (47MB)

And the bas XML file has gone.

Thanks!!

@seanmcleod
Copy link
Member

@AlbanBERGERET-Epic
Copy link
Contributor Author

It's normal that the link is invalid. It will be live next week...

@bcoconni bcoconni merged commit 2a5985c into JSBSim-Team:master May 1, 2022
@ICanDoThings2
Copy link

Is this working with 5.01? Or only for 5.1? How would I compile this, I see no solution file in the example project folder for UE5.

@HeadClot
Copy link

HeadClot commented May 4, 2022

Is this working with 5.01? Or only for 5.1? How would I compile this, I see no solution file in the example project folder for UE5.

Hey @ICanDoThings2 - You need to generate the solution file by right clicking the .uproject file and click "Generate Visual Studio Project files". It should also work with Unreal 5.01.

@ICanDoThings2
Copy link

Is this working with 5.01? Or only for 5.1? How would I compile this, I see no solution file in the example project folder for UE5.

Hey @ICanDoThings2 - You need to generate the solution file by right clicking the .uproject file and click "Generate Visual Studio Project files". It should also work with Unreal 5.01.

I found it now I think, thanks and sorry! I think I see now. I thought LWC wasn't supported in UE5 yet though.

@AlbanBERGERET-Epic
Copy link
Contributor Author

@ICanDoThings2, yes, it works for UE 5.0.1
You'll find in the Unreal Engine folder a md file with all instructions for the build.

UE will indeed generate the sln file for you. Have a look at the tutorial (link in the md) to learn more. LWC is here in 5.0 but should should enable large world in the worldsettings to enable it entirely.

@ICanDoThings2

This comment was marked as resolved.

@ICanDoThings2
Copy link

After we compile the project with the plugin in UE5, can we move the plugin to other projects and outside the folder it's compiled in? Or must it stay there and/or paired to the example project forever?

@AlbanBERGERET-Epic
Copy link
Contributor Author

@ICanDoThings2

Sorry for the answer delay, but we are live on wats2022 event, with lots of attendance on our booth, so I can't be as present as needed...

Did you build the jsbsimforunreal.sln file at the root folder of jsbsim first? This solution will build jsbsim as static libs and copy all the needed includes and resources in the plugin folder. This is needed by UE plugin system.
So make sure you have the includes copied during the post-build event. They should be located in the Unreal engine/plugins/jsbsimflightdynamicmodel/source/3rdparty/jsbsim (or something like that, from the top of my head).

Once you build the plugin for the first time (and actually, even once you build the root jsbsimforunreal.sln for the first time), you can just copy/paste the whole plugin folder to your own application. This is even recommended to do so because the reference application is here as an example, and as a way to do non-regression tests.

@AlbanBERGERET-Epic
Copy link
Contributor Author

Please also make sure that there is never any space in your folder hierarchy.

@ICanDoThings2
Copy link

@ICanDoThings2

Sorry for the answer delay, but we are live on wats2022 event, with lots of attendance on our booth, so I can't be as present as needed...

Did you build the jsbsimforunreal.sln file at the root folder of jsbsim first? This solution will build jsbsim as static libs and copy all the needed includes and resources in the plugin folder. This is needed by UE plugin system. So make sure you have the includes copied during the post-build event. They should be located in the Unreal engine/plugins/jsbsimflightdynamicmodel/source/3rdparty/jsbsim (or something like that, from the top of my head).

Once you build the plugin for the first time (and actually, even once you build the root jsbsimforunreal.sln for the first time), you can just copy/paste the whole plugin folder to your own application. This is even recommended to do so because the reference application is here as an example, and as a way to do non-regression tests.

I got it now, so sorry about that. Is there any sort of documentation for implementing new planes with the plugin and demo? And again, when we compile the example project, can we take the plugin out and put it in other projects, or will it only work with the example?

@ICanDoThings2
Copy link

Do you think for a future release, we might have support for creating and editing models in the editor instead of having to write them strictly in an .xml file? It would make tweaking models much easier in my opinion.

@ICanDoThings2
Copy link

Also, maybe a way to toggle flight dynamics calculations on/off for when an aircraft is landed too or something so it's not doing math for nothing, or in cases when we want to animate it kinematic wise temporarily I think would be invaluable.

@thorcx
Copy link

thorcx commented Jun 4, 2022

@AlbanBERGERET-Epic Hi, how do i report bugs about the JSBSim for unreal engine5 plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants