# FGear Vehicle Physics (v1.4)

**URL:** <https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793>\
**Category:** UE Marketplace\
**Tags:** unreal-engine, fab\
**Created:** [July 16, 2019, 4:10pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793 "2019-07-16T16:10:39Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [September 21, 2019, 7:35pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/21 "2019-09-21T19:35:19Z")

</div>

> [@IronSuit](#):
>
> However, i would like to have a UI that allow us to change values of cars on realtime so we can monitor the effects.
> 
> like spring force and all stearing values, torque, max rpm,… ect. i believe this would be the best demo for this kind of product.
> 
> Also please make the camera rotatable using middle button or anything else so we can see the around the car (for example watching the suspension on the bumps)

most of the settings can be configured from unreals interface in both editor & play mode. there a couple of settings that can only be changed in editor time like mass & inertia settings. camera is also configurable, if you set its spring to zero it will not look towards the vehicle, i will check if mouse control is possible to add.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [September 21, 2019, 11:09pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/22 "2019-09-21T23:09:50Z")

</div>

i have a question guys, 4.23 is released a couple weeks ago and we want to start with this version.  
do you think we should add support for 4.22 or just go with the latest version, thank you.

---

<div class="post-metadata">

**Author:** ![Syedhs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Syedhs](https://forums.unrealengine.com/u/Syedhs)\
**Post date:** [September 22, 2019, 12:19am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/23 "2019-09-22T00:19:16Z")

</div>

I think since 4.23 has just been released (and no patch yet), you should add support for 4.22 too. Many people are sticking to 4.22 even for their new project.

---

<div class="post-metadata">

**Author:** ![IronSuit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IronSuit](https://forums.unrealengine.com/u/IronSuit)\
**Post date:** [September 24, 2019, 11:43am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/24 "2019-09-24T11:43:04Z")

</div>

> [@lazybitgames](#):
>
> most of the settings can be configured from unreals interface in both editor & play mode. there a couple of settings that can only be changed in editor time like mass & inertia settings. camera is also configurable, if you set its spring to zero it will not look towards the vehicle, i will check if mouse control is possible to add.

i don’t understand why are we not able to change values of the car at runtime.

Say i offer upgrade to my players where they can upgrade their steering or suspension.  
your plugin would be severely limited if it cannot update values at runtime.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [September 24, 2019, 6:10pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/25 "2019-09-24T18:10:09Z")

</div>

> [@IronSuit](#):
>
> i don’t understand why are we not able to change values of the car at runtime.
> 
> Say i offer upgrade to my players where they can upgrade their steering or suspension.  
> your plugin would be severely limited if it cannot update values at runtime.

you misunderstand, you can change them at runtime, what i am trying to say is that you do not need an in game ui to tweak your setups during development.

---

<div class="post-metadata">

**Author:** ![IronSuit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IronSuit](https://forums.unrealengine.com/u/IronSuit)\
**Post date:** [September 26, 2019, 6:49pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/26 "2019-09-26T18:49:07Z")

</div>

> [@lazybitgames](#):
>
> you misunderstand, you can change them at runtime, what i am trying to say is that you do not need an in game ui to tweak your setups during development.

what i meant is to include an in game ui to tweak values in your demo, so we can see how your physics calculations are behaving for different values before buying the plugin.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [September 28, 2019, 11:00am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/27 "2019-09-28T11:00:35Z")

</div>

> [@IronSuit](#):
>
> what i meant is to include an in game ui to tweak values in your demo, so we can see how your physics calculations are behaving for different values before buying the plugin.

i see, if we put all the settings including the tire models, there can be up to 150+ parameters so it is a lot work, anyway we will consider this in the future, right now we are focused on deploying the initial version.

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [September 28, 2019, 12:13pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/28 "2019-09-28T12:13:18Z")

</div>

The demo feels great! I hope the code is stable and performing well enough to be used in production.  
Does it use the PhysX lib?

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [September 28, 2019, 12:28pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/29 "2019-09-28T12:28:41Z")

</div>

> [@Mellnik](#):
>
> The demo feels great! I hope the code is stable and performing well enough to be used in production.  
> Does it use the PhysX lib?

thanks, glad you like it.  
unreal uses physx so we do use physx but that does not mean we use any vehicle functionality of physx.  
tire friction and suspensions are all handled by fgear, we only make calls to the FBodyInstance struct like AddForceAtPosition or GetUnrealWorldVelocityAtPoint.

---

<div class="post-metadata">

**Author:** ![IronSuit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IronSuit](https://forums.unrealengine.com/u/IronSuit)\
**Post date:** [September 29, 2019, 7:16am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/31 "2019-09-29T07:16:43Z")

</div>

> [@lazybitgames](#):
>
> i see, if we put all the settings including the tire models, there can be up to 150+ parameters so it is a lot work, anyway we will consider this in the future, right now we are focused on deploying the initial version.

You can do something similar to this guy. [https://youtu.be/PCyL7QcKKO4](https://youtu.be/PCyL7QcKKO4)

its fairly straight forward, and understandable ui to change the parameters on runtime.  
I’m only asking this because i’m in a dire need for a good car physics.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 2, 2019, 10:12pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/32 "2019-10-02T22:12:30Z")

</div>

it is finally available in marketplace : [https://www.unrealengine.com/marketp…7d00ddbe1121df](https://www.unrealengine.com/marketplace/en-US/slug/34e20fc0b8d54f72b77d00ddbe1121df)

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [October 5, 2019, 6:28pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/33 "2019-10-05T18:28:42Z")

</div>

From the documentation this looks very well thought out.  
Can you please provide some benchmarks for the simulation of the a vehicle? Preferably in comparison with the default UE vehicle implementation. What if there are 30-50 vehicles in a scene where some of them just stand still and others drive around.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 5, 2019, 6:51pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/34 "2019-10-05T18:51:45Z")

</div>

> [@Mellnik](#):
>
> From the documentation this looks very well thought out.  
> Can you please provide some benchmarks for the simulation of the a vehicle? Preferably in comparison with the default UE vehicle implementation. What if there are 30-50 vehicles in a scene where some of them just stand still and others drive around.

good idea, will do it, thank you.  
i wouldn’t use fgear for stationary or traffic vehicles though, it would be overkill.  
anyway a comparison with ue vehicles will make things clear.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 5, 2019, 8:10pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/35 "2019-10-05T20:10:39Z")

</div>

i added a list of known issues to the first post.  
these will be updated as bugs are discovered or solved.

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 5, 2019, 10:27pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/36 "2019-10-05T22:27:13Z")

</div>

> [@Mellnik](#):
>
> From the documentation this looks very well thought out.  
> Can you please provide some benchmarks for the simulation of the a vehicle? Preferably in comparison with the default UE vehicle implementation. What if there are 30-50 vehicles in a scene where some of them just stand still and others drive around.

made a quick test and recorded a video.  
test map contains 200 basic cars(uses simplified pacejka tire model + no effects + 100hz) and 4 sandbox demo vehicles.  
when all 200 cars are visible i get around 65-70 fps at average, if i look away from vehicles i get 140+ fps.  
my system is i7 4790k + 2gb R9 380

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/b/07b532fd735b447862fc9e1fb130f55cbe46aedd.jpeg "FGear Unreal Engine 4 Stress Test") ](https://www.youtube.com/watch?v=iKC_s9GMhj0)

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [October 6, 2019, 5:32pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/37 "2019-10-06T17:32:13Z")

</div>

Thanks, bought the plugin and it looks great so far. Just wanted to test it on Android but getting this error when launching it: “Plugin FGearPlugin failed to load because module FGearPlugin could not be found.”

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 6, 2019, 8:01pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/38 "2019-10-06T20:01:57Z")

</div>

> [@Mellnik](#):
>
> Thanks, bought the plugin and it looks great so far. Just wanted to test it on Android but getting this error when launching it: “Plugin FGearPlugin failed to load because module FGearPlugin could not be found.”

i have just tried it from ground up and it just worked ok.

may be it is related with another problem like the following topic: ["Plugin 'X' failed to load because module 'X' could not be found. - Plugins - Epic Developer Community Forums](https://answers.unrealengine.com/questions/772351/plugin-x-failed-to-load-because-module-x-could-not.html)

---

<div class="post-metadata">

**Author:** ![lazybitgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazybitgames](https://forums.unrealengine.com/u/lazybitgames)\
**Post date:** [October 10, 2019, 5:36pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/39 "2019-10-10T17:36:25Z")

</div>

here is a preview screen from runtime modification sample, we only took a small set of parameters for this otherwise it could take forever to complete the ui blueprints:

 ![Untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/8/18c560810ddada69b4fcf6acc6434f92d6618cf9.jpeg)

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [October 13, 2019, 6:58pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/40 "2019-10-13T18:58:44Z")

</div>

Found the issue regarding the module not being found on Android. You need to add “FGearPlugin” to your PublicDependencyModuleNames in your Build.cs of your project.

---

<div class="post-metadata">

**Author:** ![Mellnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mellnik](https://forums.unrealengine.com/u/Mellnik)\
**Post date:** [October 14, 2019, 2:32pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/41 "2019-10-14T14:32:14Z")

</div>

Some suggestions and requests:

You have very much logic inside the AFGearVehicle class. Most of that should be inside of a component instead. The reason for that is it makes inheritance easier. For example in my project I have a base class “AVehicle” that inherits APawn. Now there is ABoat, AHelicopter, AWheeledVehicle and APlane. All of them inherit AVehicle.  
For cars I use the default UE4 vehicles right now so I just have to add some components to AWheeledVehicle. If I wanted to use your plugin I would need to copy everything from AFGearVehicle to AWheeledVehicle.

Do not override UPhysicalMaterial. It just makes everything harder for existing projects to use your plugin. I would need to recreate all physical materials. It also prevents users from defining settings per vehicle (friction, roughness, smoke particles etc.)  
Instead do it similar to UE4’s vehicle system. They have a tire config class where you can define friction etc. per physical material surface. You can then assign the tire config per wheel. (You already have UFGearTire or UFGearWheelOptions that you could use here.)

Do not override USkeletalMeshComponent. Basically same as above. Makes it hard to switch to your plugin. I also see no usage of your custom class in the code.

Replication! I know it’s already on your list, just saying this is important.

Backfire detection for the effects class. Somebody else already suggested.

Support for more platforms. Probably works but if you could support Linux and Mac that would be great.

[Previous page](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793.md?page=1)

[Next page](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793.md?page=3)
