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

<div class="post-metadata">

**Author:** ![gurusaint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gurusaint](https://forums.unrealengine.com/u/gurusaint)\
**Post date:** [June 1, 2023, 7:40pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/961 "2023-06-01T19:40:51Z")

</div>

@lazybitgames Speaking on the small vibrations. Is there any way physics or tick could be disabled when vehicle actors are far away from the player? Currently, I am activating collision in static mesh wheels to keep the vehicles from sinking into the ground but I haven’t seen anything in the plug-in to do this.

---

<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:** [June 1, 2023, 8:21pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/962 "2023-06-01T20:21:12Z")

</div>

there is no such built-in feature.

---

<div class="post-metadata">

**Author:** ![DFKETGS2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DFKETGS2](https://forums.unrealengine.com/u/DFKETGS2)\
**Post date:** [June 5, 2023, 12:39pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/963 "2023-06-05T12:39:24Z")

</div>

Hello @lazybitgames , is there a way to make the vehicle come to a complete stop? , when I do a respawn it moves a bit, that is, is there a way for it to be with a permanent handbrake until I decide that it can move? what function should i use?

---

<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:** [June 5, 2023, 3:30pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/964 "2023-06-05T15:30:55Z")

</div>

Check in fgear functions for Start Grid Mode, there are several ways you can do this also as you state via handbrake etc. Also you can disable engine and set brakes on in a few ways.

---

<div class="post-metadata">

**Author:** ![gurusaint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gurusaint](https://forums.unrealengine.com/u/gurusaint)\
**Post date:** [June 5, 2023, 6:05pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/965 "2023-06-05T18:05:05Z")

</div>

In addition to what @PerfsPC said. The customization map has a function where the handbrake is activated when you navigate the ui. But off the engine node there is a Boolean to set running. You can set the handbrake and engine nodes off the unpossesed event.

---

<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:** [June 7, 2023, 4:24pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/966 "2023-06-07T16:24:06Z")

</div>

Maybe im missing something, but, if you use AutoChange but disable AutoReverse, when car stops, how you trigger reverse then?

Because shifter Sequential and Manual are disabled with “AutoChange” enabled. ¿?

- 

So trying to get this brake/reverse behaviour:

1.- If you press brake with more than 0 speed or car in motion it will decrease until 0 and will stop the car.

2.- Only if you press brake when the car speed is at 0 & motion 0 = activate reverse.

Now with autoReverse if you are in a corner or do a 180º and get some 0 or negative speed value, if you press brake it activates reverse when you really want to continue braking.

- 

Im looking in FGearTransmission & FGearStandardInput.

Tried some stuff but nothing is working as wanted.

The problem is how to detect the braking is pressed after car is stopped and not already pressed.

Or maybe enable sequential gear if autoreverse is off, so you can set just the R. On accel then it goes to autochange again ¿?.

EDIT: Im trying to enable sequential working with Autochange to enable reverse with AutoReverse disabled. Gears works always that are in gear ratio donw/up but it not changes always that is pressed like without autochange but can figure how.

---

<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:** [June 7, 2023, 9:04pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/967 "2023-06-07T21:04:24Z")

</div>

Well, i got something working.

```auto
	// ADDED ***********************
	// Using Sequential to set R in AutoChange mode without AutoReverse
	
	if (mShifterType == FGearShifterType::SEQUENTIAL)
	{
		// Set R
		if (mGearboxInput < 0) mVehicle->getTransmission()->gearDown(true);

		//invertVertical	
		if (mVehicle->getTransmission()->getCurGear() < 0)
		{
		float tmp = mEngineInput;
		mEngineInput = mBrakeInput;
		mBrakeInput = tmp;
		}
	}
    // ADDED ********************************************

```

Now i can have AutoChange and set reverse when needed.

The optimal thing will be set autoreverse only when the car have some X angle+negative speed values / motion. To avoid autoreverse in the scenarios mentioned like 180º corners,etc… but still allow when you want to do a 360º or similar.

---

<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:** [June 7, 2023, 9:15pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/968 "2023-06-07T21:15:58Z")

</div>

This sounds really useful, thanks @Davit_Masia - Will also test this out.

---

<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:** [June 8, 2023, 10:30am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/969 "2023-06-08T10:30:59Z")

</div>

In FGearStandardInput.cpp , search for “bool invertVertical”

```auto
	// ADDED ****************
	//invert engine/brake inputs in reverse(auto)

	// Added "getSteerDeltaAngle" to use only on wanted situations

	bool invertVertical = mVehicle->getTransmission()->isAutoChange() &&
						  mVehicle->getTransmission()->isAutoReverse() &&
						  mVehicle->getTransmission()->getCurGear() < 0 &&
						  FMath::Abs(mVehicle->getSteerDeltaAngle(true)) > 89.99f ;
						  
	// ************************************

```

Still testing but seems this can fix some of that issue. Trying to find the correct getValue. At least the problem not happens as much as before.

---

<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:** [June 8, 2023, 2:32pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/970 "2023-06-08T14:32:18Z")

</div>

Which cpp was this? FGearTransmission.cpp?

---

<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:** [June 8, 2023, 2:36pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/971 "2023-06-08T14:36:47Z")

</div>

> [@Davit\_Masia](#):
>
> FGearStandardInput.cpp

Both FGearStandardInput.cpp . On transmission im trying some stuff too but at the moment no changes were made there, just tests that are all disabled.

---

<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:** [June 8, 2023, 2:41pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/972 "2023-06-08T14:41:33Z")

</div>

Ah ok

---

<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:** [June 12, 2023, 10:17am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/973 "2023-06-12T10:17:22Z")

</div>

CHANGELOG v1.6.2  
Unreal5.2 support  
Improvements and bug fixes

Warning:  
-To use the example project with Unreal5 copy the FGearPlugin folder in Unreal5\Engine\Plugins to FGearExample\Plugins folder.

Additional Notes:  
-Ensure fails are eliminated for non-substep mode.  
-Overall refactor to use physics transform instead of actor transform for vehicle calculations.  
This fixes some hidden issues and makes the plugin more stable in Unreal5.  
-A landscape is added to sandbox map.  
-Added an option to override CollisionTrace for custom collision in order to fix Unreal5 issues.  
-Fixed a minor issue with the Constraint map.  
-Engine power calculation wasn’t taking friction torque into account, this is fixed now.  
-Added ability to set bone name of wheels.  
-Convex casting meshes no longer generate overlap events with the world.  
-Wheel.setRadius function is updated to work with convex casting.  
-Convex casting options are extended and moved to vehicle class.  
-A custom cylinder mesh asset is included in the plugin folder which works fine against the landscape in Unreal5.  
-Cleared all deprecated warnings.

---

<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:** [June 12, 2023, 10:34am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/974 "2023-06-12T10:34:38Z")

</div>

Top work as always, thank you for the update, will check this out soon as I can.

---

<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:** [June 12, 2023, 12:03pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/975 "2023-06-12T12:03:54Z")

</div>

> [@lazybitgames](#):
>
> -Added ability to set bone name of wheels.

I thought we had this anyway? or am I missing something.

---

<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:** [June 12, 2023, 8:10pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/976 "2023-06-12T20:10:01Z")

</div>

you might have added it yourself…

---

<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:** [June 12, 2023, 8:11pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/977 "2023-06-12T20:11:53Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/f/7df04471ff671f6bc7d49c1e0b2ee36d6c560511.png)  
Are we referring to this? for each wheel as that’s been there for years :), must be something else I’m not aware of?

---

<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:** [June 12, 2023, 9:51pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/978 "2023-06-12T21:51:42Z")

</div>

Im interested about this:

## -Engine power calculation wasn’t taking friction torque into account, this is fixed now.

To confirm, the added/edited was in FgearEngine.cpp, with this?

```auto
float friction = (rpm / mLimitRpm) * mFrictionTorque;|
float torque = mTorqueScale * (mTorqueCurve->GetFloatValue(rpm) - friction);|

```

Or there is any other line added/edited about this fixed issue? Want to test one and other to check the driving difference.

---

<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:** [June 12, 2023, 9:58pm UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/979 "2023-06-12T21:58:59Z")

</div>

it doesn’t effect the simulation, just the displayed power text.

@PerfsPC added a new function to update at runtime

---

<div class="post-metadata">

**Author:** ![gurusaint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gurusaint](https://forums.unrealengine.com/u/gurusaint)\
**Post date:** [June 13, 2023, 1:19am UTC](https://forums.unrealengine.com/t/fgear-vehicle-physics-v1-4/128793/980 "2023-06-13T01:19:13Z")

</div>

This is awesome. Thanks for the support and the ability to set bone names!

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

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