FGear Vehicle Physics (v1.4)

@lazybitgames Do you have any plans to improve the wheel collider? My project involves a lot of physical interaction with the car, especially its wheels. Currently, it doesn’t look very good. Although the driving physics are quite decent, the interaction between the wheels and the surrounding world spoils everything. Here’s what I’m getting:

I would like something like this:

Adding a mesh proxy for the wheels helps a bit but not significantly. The wheel collision logic itself needs to be rewritten.

That seems to be a suspension issue. Have you tried playing around with the suspension in the wheel options

This is not a suspension issue. It’s a limitation of simple raycast/ multi raycast or shape cast. Here’s a comparison for Unity:

yes, open wheels are a problem of fgear’s wheel colliders.

these hybrid wheel colliders are more expensive but gives great interaction quality.

the answer is we’ve got a plan for the long term but do not expect it in the near future.

3 Likes

[Looking for help with a bug]
Hi there, I’m seeking assistance with a specific issue in my Unreal Engine 5.1 source build multiplayer game.

The game is running on a dedicated server and utilizes the fgear system. I’ve encountered a peculiar problem: once there are six players on the server with six or more cars actively driving around, all six cars experience sudden and severe performance degradation. It’s as if they’re affected by extreme packet loss and high ping, rendering them undriveable. Interestingly, other aspects of the server, such as player movement, remain unaffected, and network saturation doesn’t seem to be the cause.

any advise on things I should check and or could try would be greatly appreciated Im quite stuck and have tried emailing the plugin developer

Hi how do you get vehicle to flip agresively like the youtube below?

Currently the vehicle just flip like a boring vehicle - it flips just once and slowly…

Edit: Done so far :-

  1. Increase the cog offset height…
  2. Set to 0 to both linear and angular damping.
  3. tweak inertia scale…
    What else? It is improving but maybe at most 15% from what is needed…

that’s a common problem of physics engines, the simulation looses energy earlier then expected.

the things you’ve tried are the ones I would suggest initially. you can also play with the physical material(friction & bounciness) of the vehicle and/or the road surface.

finally if you want to try an advanced solution, you can experiment with contact modification.

1 Like

When you disable physics on a vehicle and re-enable it. The simulation begins at the new resting position of the suspension. How does one prevent that?

Thanks. Maybe I will also ‘enhance’ it by injecting impulse at the right direction…

may be if you combine it with the new sleeping feature it would work.

sleep → disable physics → enable physics → wake

1 Like

Hi,

I’m developing an off-road game for a mobile platform in BP and I have the following questions:
1 - Would it be possible to switch between 4x4 and RWD at runtime?
2 - Would it be possible to lock the differential at runtime?
3 - Would it be possible to make the engine lose power at runtime? (Simulating a mechanical problem)
4 - Would it be possible to simulate a flat tire at runtime? (Reducing wheel size and increasing drag)
5 - Would it be possible to simulate a lost wheel? (Reducing the size of the wheel to the brake disc and leaving it locked)
6 - Is the version for UE 4.27.2 updated to 1.7? Will it continue to receive updates?
7 - Does the plugin work with UE source? Can it stay in the game directory or does it have to be added to the engine?

About performance:
p1 - ​​Would it be possible to switch between casting types at runtime? Raycast when on fast runs and sphere/convex when climbing rocky hills.
p2 - Would it be possible to put the system to “sleep” when getting out of the vehicle? At least in the functions that consume the most performance?
p3 - Could you tell me if the vehicle created in your plugin is lighter or heavier than the UE standard vehicle, by how much?

I suggest you add a list of nodes that are available for adjustment at runtime to the documentation, with short descriptions of the functions.
At first glance your plugin seemed to be something closed with just the documentation options, I only got an idea that it would be possible to make some changes at runtime with BP when reading this forum.

Thanks

1, 2, 3 → yes
4, 5 → can reduce the wheel radius, it is a bit tricky but it should be possible to apply independent brakes to each wheel(never tried that). so to introduce drag or for locking the wheel you could use brakes.
6 → 4.27 is up to date. the next update will introduce the enhanced input system support, if we can keep a single repository with that then we’ll keep the 4.27 support if not we might end up dropping it. the thing is, a programmer can simply copy the source files and make some minor modifications to make it work with unreal4.
7 → there is no such requirement, you can use it as a plugin or just make it a part of your projects source code with some minor adjustments.

p1 → it looks possible also didn’t try that before.
p2 → you can initiate a manual sleep but it can be waken up by some other factor. we also have an automatic sleeping feature but due to a problem with the physics engines we don’t make the vehicle sleep when there is a simulated object in close proximity.
p3 → I think fgear has decent performance when you consider it’s features but I’ve never compared it with another system. the only thing I could show you is a stress test video on our youtube channel but it is an older ue4 version. the downside is that we do not support async physics yet, the engine support is still raw and it makes it difficult to exchange data between threads.

about the BP documentation, as a programmer I think the header files are a good source of documentation. but of course you can not view them without buying the plugin.

we have a separate runtime modification map in the sample projects which demonstrates how you can modify things at runtime.

Is changing the casting type at runtime possible in the current version?

It would be interesting for those who don’t yet have the plugin to test a build with this map with the settings at runtime. (If possible also an Apk of this map and the demo too)

“but of course you can not see them without buying the plugin”, but how can I buy a plugin for this amount without first knowing the functions and resources?

In any case, I think it’s better to wait for a definition on the fate of UE4 support.

Thanks.

my answers are about the current version.

we have demonstrated the main features in public demos, in order to do it for all features we would need many more demos and I don’t think people would test all of those and also it would be difficult to maintain all those demos.

about documentation we once had a c++ api document but I realized noone ever used it so we don’t release it anymore and we expose all getters & setters to BP so almost all features are exposed to BPs. in any case if someone is not willing to buy due to lack of documentation I respect that but our resources are limited, we prefer to use our time for maintaining the project.

4 Likes

for those having problems with dedicated server, try using -useperfthreads command line option on the server, it will prevent single threaded physics.

for large input delays try to find optimum numbers for “Input Sendrate” and “Input Buffer Size”. (start by reducing buffer size)

but if need the C++ documentation, you will provide it right ?.

c++ api document is just a summary of each header and composed of comments of each function so basically it’s not different then reading header files(that’s probably why most people never looked at c++ api docs). you get the full source code which means if you can read c++ code then you already have the documentation. in any case if you need more information, you can ask about it via mail.

1 Like

thank for clarifying it.

Hello, I would like to get less steering wheel sensitivity, but it doesn’t work, what other functions should I add?