FGear Vehicle Physics (v1.4)

@lazybitgames what is the purpurse of the “save state” function ? I can’t find any documentation on it.

I still need to test, but be sure is the FGearPlugin. One way to do is pick the FGear example project and try to compile with the new binaries. Before not worked, but if now is fine and your project not, is because you are using some other plugin with the same problem FGear had.

it is used for rewind/replay.

1 Like

as Davit_Masia said grab the example project, package with the the latest binaries, if it works then you have another problem.

@lazybitgames We found a problem in the convex tracing method.


For some reason the skidmark not match with the wheels. With line or Sphere works perfect. But with Convex it does weird things, like change left/right offset fast in you go in straight line ¿?.

It looks the problem is with the hit trace of the wheels. Having in mind the convex shape is a cylinder & in theory it only moves with steering, no rotation/camber/toe, no idea why this happens.

So, maybe this means the physics with the convex shape not works as they should? No idea how the trace hit in convex shape should work, or maybe with convex shape using the hit trace from wheels to set the skidmarks position is not the correct way ?.

EDIT: Well, im guessing the hit trace points in convex cylinder shape are the left-right edge, so that why the skidmark “dances” to one side or another and does weird things. So, i guess we just need to detecr when the wheel hits the ground and set the position from the wheel static mesh.

I had a similar “issue”. This is also evident in the telemetry UI. If I draw a debug sphere based on the line trace from the wheel. The sphere jumps around and even lags sometimes. I haven’t tried it yet but will a scene component attached to a customized Niagara skid particle fix this?

@lazybitgames Also this is weird, i set convex shape visible and visuals are a bit weird:

Not should the convex shape be in the physical wheel location? It happens in all cars, even the FWD_BP example one. Because were gonna use the wheel location for skidmarks but realize gave us a wrong location, and is the bottom of that visual convex shape. Is a bug?

the convex mesh is placed at the same spot with the rays, centered.

if your bones are not at the center of your wheels(like the image below) you can experience this issue.

you can use the rim offset parameter to align them.

Then all your cars are wrong too due they have the same problem.

The rim can change in the Y offset, but the convex shape appears in the wrong Z offset.

Also, the physical wheels with the gizmos are all correct. Is when you set tracing “convex” and set visible convex shape, it appears in the wrong Z offset. ¿? My bones,etc… are all them centered and fine same as yours, and my cars and all the ones you have in the FGearExample project, have the same issue.

@Davit_Masia I also posted about this a few months back as I was confused myself at the location, Yunus said this was normal in his reply to me

Oh i see, weird.

Well, then i guess we have to use another value to set correctly the skids.

never mind the Z position, the mesh is located where you see it(where it is supposed to be) and it is casted downwards.

the gizmo uses the bone position so it looks fine but I agree this is a bit misleading and confusing.

Hi there,
There were some questions with the integration of the vehicle in Unreal 5’s template. So I will briefly explain it here.

  1. Edit physics asset of the vehicle and remove all collisions then add a box to root. Set Pyhsics type as “simulated”

  2. Set bone names to bone names for each wheel.
    Phys_Wheel_FL,Phys_Wheel_FR,Phys_Wheel_BL,Phys_Wheel_BR

  3. Create animbp like Sedan_AnimBP (dir: /Game/FGearAssets/AnimationBP/Sedan_AnimBP.Sedan_AnimBP’)

Also you can find my test files attached. Extract and copy “Vehicles” folder to “fgearunreal\Content”. Thats it. (Note: Unreal version 5.2.1)
Vehicles.rar (8.0 MB)

2 Likes

Hi! kind of new user here,

Im triying to figure out how to detect if the car is jumping (not touching the ground) there are some functions for this in unreal for chaos vehicles and characters, but they doesnt seem to work with the fgear vehicle. I found the “get detect ground” and “set detect ground” related to fgear but they dont seem to work in the way that i expected (or maybe there is a setup needed that i dont know of)

this example in the vehicle blueprint keeps printing ground forever:

iterate over the wheels and check if any of them is touching the ground with the Wheel.hasContact function.

1 Like

Thanks very much, it worked great! is there any function/node reference page/document for fgear?

there is a link at the end of the Overview.pdf for an api reference file but it might be a bit out of date, I would just read the headers…

1 Like

Hello @lazybitgames , I activate the “Sticky tire max speed” and the car slides little by little to the side, it slides very slowly but it is noticeable, when I deactivate it the car cannot brake completely, I have activated the “FgearTireMF61” tire

sticky tire is not a toggle, for ex. when you set it to 5 then it is activated when you go slower then 5kmh. if it is a small number it might be difficult to activate it. so what’s your sticky tire max speed? if you’re certain you meet the criteria but still fail then send your vehicle save via mail.

tire model has no effect on sticky tire mode.

Hi all,

New dev here, I probably am doing something super basic wrong but when I try to import my model, this is the closest I can get to movement of any kind. Inputs aren’t really reading and my wheels are all out of whack. I’m not sure if my issue is an Import issue or something with FGear, but could anyone possibly assist? Thank you!

Quick GIF to show what’s going on: Imgur: The magic of the Internet (idk why there’s an age gate warning on it but I swear it’s just an Audi with some bugged out wheels)