# 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:** 30

<div class="post-metadata">

**Author:** ![OverRated\_AU](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/overrated_au/32/1008648_2.png) [@OverRated\_AU](https://forums.unrealengine.com/u/OverRated_AU)\
**Post date:** [March 9, 2022, 11:56am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/592 "2022-03-09T11:56:24Z")

</div>

I will have to check I was just using the demo project and cloned one of the vehicles so I changed nothing apart from the mesh.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8b3c65dc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8b3c65dc](https://forums.unrealengine.com/u/anonymous_user_8b3c65dc)\
**Post date:** [March 9, 2022, 10:54pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/593 "2022-03-09T22:54:52Z")

</div>

It works!  
Thank you very much, [Last\_Coin\_Games](https://forums.unrealengine.com/u/Last_Coin_Games)!

---

<div class="post-metadata">

**Author:** ![Kangaaa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kangaaa](https://forums.unrealengine.com/u/Kangaaa)\
**Post date:** [March 17, 2022, 8:56am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/594 "2022-03-17T08:56:24Z")

</div>

This was one of the reasons I went away from Epics vehicles. In FGear, quick overlaps of collisions do throw violently still - however, it seems this comes from PhysX. Enabling sub-stepping and having less complex geometry solves most issues.

---

<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:** [March 23, 2022, 5:17am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/595 "2022-03-23T05:17:52Z")

</div>

Finally I bite the bullet and made the purchase last week…

Just that I am stumbling into a weird crashing error which can only be solved if I commented out body-\>AddCustomPhysics(onCalcCustomPhysics) in UFGearSkeletalMeshComponent class.

My class structure is a bit complex though… simplified explanation is I created a C++ class name BaseVehicle which derive from FGearVehicle. And this BaseVehicle is later made a parent to BP class where only in this bp class that mMesh (vehicle skeletal mesh) is filled (otherwise null). Probably this contributes the crashing error but I am still looking for an answer.

---

<div class="post-metadata">

**Author:** ![Last\_Coin\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Last\_Coin\_Games](https://forums.unrealengine.com/u/Last_Coin_Games)\
**Post date:** [March 23, 2022, 12:09pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/596 "2022-03-23T12:09:31Z")

</div>

Hi

- Did you add this line :PrivateDependencyModuleNames.AddRange(new string[] { “FGearPlugin” }); into Build.cs
- Can you share the error messages when crashing? also does it crash at editor time or at runtime?
- Are the plugin files inside the project or in the engine directory?  
I used fgear in a project (4.27) and did the same things as you. I didn’t see any problem.

---

<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:** [March 23, 2022, 12:50pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/598 "2022-03-23T12:50:38Z")

</div>

I have to delete my previous post - because just realized it is different crash error.

---

<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:** [March 23, 2022, 1:38pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/599 "2022-03-23T13:38:25Z")

</div>

Okay here is the stack trace:

 ![crash-ue4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/0/7a0c20a807f5123e5b8e040f8b6f75da4e80cee5.png)

Red underline is FGearSkeletal AddCustomPhysics begins…

And it only happens in multiplayer. If I play in standalone in editor (pie), then it is okay.

---

<div class="post-metadata">

**Author:** ![Last\_Coin\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Last\_Coin\_Games](https://forums.unrealengine.com/u/Last_Coin_Games)\
**Post date:** [March 23, 2022, 2:22pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/600 "2022-03-23T14:22:18Z")

</div>

I have tested on Multiplayer map in FGearAssets. Also tried with customcollisioncomponent and without any collision. It was working. Just crash when i removed physics asset but not same your error code.  
Can you share more information with us? Have you tested on fgear sample projects? or what does the c++ class you add yourself contain

---

<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:** [March 23, 2022, 3:43pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/601 "2022-03-23T15:43:37Z")

</div>

Yes I am sure fgear works well in multiplayer mode… it just doesn’t run in my case… there must be something skipped or unusual in my setup.  
It is hard to explain my code without actually giving all the source code… 🤣…  
Well I am just looking for some pointers here or tips which will point me to the right direction…  
I think I will just look back at the sample or the documentation… just double checking.

---

<div class="post-metadata">

**Author:** ![Last\_Coin\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Last\_Coin\_Games](https://forums.unrealengine.com/u/Last_Coin_Games)\
**Post date:** [March 23, 2022, 4:27pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/602 "2022-03-23T16:27:57Z")

</div>

- try change physics type to simulated in physics asset window. Check substepping in engine
- physics category in project settings.  
if only the vehicle part; If you can downgrade it to run in the fgear demo, you can send me the files privately. Else just skeletal mesh and your custom c++ class which inherit gear vehicle.

---

<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:** [March 25, 2022, 4:56am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/603 "2022-03-25T04:56:20Z")

</div>

I still have not solved the problem… apparently the bodyinstance (physics) is somehow corrupted or invalid or something…  
I have put the code to check:  
if (mBody && mBody-\>IsValidBodyInstance()) but it still crashed.  
This time I think this is probably due to me upgrading the project from 4.19 → 4.27 and cause all kind of weird issues. So now, I will try to create a new vehicle bp derived from fgear and have it as simple as possible - hopefully this will not crash. And then, I will add back old code slowly…

---

<div class="post-metadata">

**Author:** ![Last\_Coin\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Last\_Coin\_Games](https://forums.unrealengine.com/u/Last_Coin_Games)\
**Post date:** [March 25, 2022, 4:15pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/604 "2022-03-25T16:15:44Z")

</div>

Yes pls try a blank derived class and use unreal’s example vehicle model (i mean skeletal mesh).

---

<div class="post-metadata">

**Author:** ![Davit\_Masia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davit_masia/32/1008648_2.png) [@Davit\_Masia](https://forums.unrealengine.com/u/Davit_Masia)\
**Post date:** [March 28, 2022, 2:02pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/605 "2022-03-28T14:02:44Z")

</div>

Hi, due on UE5 cascade is deprecated, for the update on the official release, means the particles smoke/tyre will be updated for Niagara? or you will drop support/delete that extra features and focus only on 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:** [March 28, 2022, 4:35pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/606 "2022-03-28T16:35:21Z")

</div>

the focus will be on physics of course but we will try to keep the extra features.

---

<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:** [March 31, 2022, 4:01am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/607 "2022-03-31T04:01:50Z")

</div>

Just to update… finally I have got the built not crashing. Changes:

1. I moved all the substep stuffs from FGearSkeletal to FGearVehicle because (to me), it make sense as BodyInstance belongs to the vehicle. And I found the call stack to be much more managable.

2. To actually solve the crash, I have to turn on a bool flag before even Vehicle’s EndPlay is invoked otherwise the crash comes - it is still accessing the BodyInstance but it is no longer valid? The bool flag when turned on, will skip FGearVehicle::tick (so I run APawn::tick instead). Not really sure why the body physics is not valid but now the code runs fine.

---

<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:** [April 5, 2022, 6:15am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/608 "2022-04-05T06:15:21Z")

</div>

I think this should be easy, but I spend hours looking for answer to no avail lol…  
How do I make the car reverse? I would like to use a keyboard event, when executed then only it will reverse (no auto reverse).

---

<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:** [April 5, 2022, 3:52pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/609 "2022-04-05T15:52:43Z")

</div>

it’s pretty easy, press Z to switch to reverse gear, press Z again to go back to 1st gear.

 ![Untitled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/2/5b29030d9b6624cf6effd53da9ff5ab94dca5659.jpeg)

---

<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:** [April 6, 2022, 6:03am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/610 "2022-04-06T06:03:14Z")

</div>

I have used Set Current Gear before, but didn’t make it (I dont know why). Now I have solved it as this is multiplayer and the code previously run on client. So I moved the code to server, now it is working. I also disabled Auto Change + Auto Reverse.

---

<div class="post-metadata">

**Author:** ![PerfsPC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/perfspc/32/1194509_2.png) [@PerfsPC](https://forums.unrealengine.com/u/PerfsPC)\
**Post date:** [April 6, 2022, 7:51pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/611 "2022-04-06T19:51:17Z")

</div>

Looking forward to it too ;), also looking forward to the 5.1 depreciation of PhysX and default engine physics of Chaos, I’m sure Yunus will do a great job for conversion when that time comes.

I’ve been waiting and delaying my project for UE5 which has been a nice break for me also to rethink!

---

<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:** [April 7, 2022, 7:29am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/612 "2022-04-07T07:29:43Z")

</div>

It would be very nice if FGear has deterministic car physics… chaos physics seem to hint that except they dont want to mention ‘deterministic’…lol

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

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