FGear Vehicle Physics (v1.4)

I not understood this, Afaik, release opensource is upload like on GitHub or similar and free access to everybody, what you mean the opensource will be more expensive?

About release date, from what you said guess is not expected this year.

So still no idea if a final big update, V2 or what? Not even a minor update with bugfixes or small features already well tested? Or the previous was the last one and everything from there will be hold until you know the future of the plugin?

opensource doesn’t mean free. currently you get the source code when you purchase the plugin, when it’s closed source you’ll only get the compiled binaries (dlls).

release date really depends on the game project, there is a game project we’re planning right now so if we start this project the release will be delayed for a long time. if we give up about the game then I will focus on the plugin itself and a release can be expected this year.

in its current state small fixes won’t bring much value, there are structural barriers to bring the plugin to a new level, that’s why most of the code is rewritten in v2.0 and there are also major feature additions. there is no new feature plans for v1.x branch, I will only fix reported game braking bugs and adapt the plugin to new unreal versions.

1 Like

@lazybitgames what options can I tinker with to make vehicles more optimized when:

  • When they are actively being controlled?

  • When they are idle/sleeping?

I’m trying to set my vehicles in sleep mode at begin but the Sleep function doesn’t seem to be doing anything. I set the sleep threshold to a very high value in the default settings of the vehicle and it checked using the “get is sleeping” function and it seems to be flip flopping around alot.

Edit: I just stumbled upon the fact that vehicle sleeps if it’s in the air aka not touching the ground, and only found this out because the linear and angular thresholds were set to the biggest float value so it just froze in mid air. However, when I overlapped/hit it, it unfroze again and while in air, froze again, but if hit by ground it stopped freezing/sleeping.

How can I utilize this to make them sleep on the ground?

Edit 2: The sleep function seems to be a bit random, I took the vehicle quite some distance away and then exited it and it went to sleep immediately, disregarding the ground now, this was a 4 wheeled truck though, so no hit between the body and ground could be a reason unlike the bike. Would appreciate more insight on this. I also noticed that the vehicle defaults to sleep if it spawns far from my character, but spawns awake if near my character, despite spawning in mid air, not touching the character. I’m having a hard time trying to find out what things cause the vehicle to prevent sleeping. I am trying multiple asset combinations near the vehicle and the vehicle seems to sleep well in isolated tests but then I put it in the actual level with all things combined and it stops sleeping.

Edit 3: Okay so I found out what asset was causing the vehicles to not sleep, but the problem is that the asset has two sphere collisions used to spawn NPCs and vehicles when the player is close, and one is set to NoCollision while the other is set to ignore everything except “Pawn”. My vehicles have meshes that are all either “Vehicle” or “Vehicle Chassis” so in theory, they shouldn’t even be overlapping, let alone colliding. I also checked overlapping with my character’s overlap spheres and it seems that if the vehicle spawns while overlapping an overlap collision even, it does not sleep, this is why the vehicle spawns awake near my character because I have a large overlap collision around my character too.

These are the collision settings for the large asset that spawns NPCs and vehicles

TLDR: The vehicle stops sleeping completely if it is left idle/spawned inside any overlap collision despite collision settings. However, in order to awaken the vehicle again, a hit is required, not just overlap.

Also, how can I have the handbrake be constantly applied to vehicles at begin play? I tried Set Inputs function with Hb Checked at begin play but vehicle still rolls off slopes

sorry for the late reply, I was on vacation.

due to some issues with the physics engine we had to force the vehicle to wake up when there is a dynamic object in proximity, this is done with an overlap check. without this the vehicle sometimes stays asleep even when it collides with another vehicle.

the bike assist applies continuous force on the vehicle so I don’t think it would sleep easily. you need to modify the source or port the bike assist code to BP and then make sure it pauses the stability force when asleep.

the example project has a map that showcases the sleeping feature.
also check Sedan_BP (red car) in the example project, it shows how you can override the inputs and set HB on by default.

1 Like

Hope you had a good vacation!

The bike assist does not affect sleeping in my case. It was a very large sphere collision that spawned NPCs and vehicles when the player was inside it. The vehicles refused to sleep even when both were set to ignore each other. I had to modify my sphere collision’s functionality to complete turn off its collision and only check for the player by distance. That solved the vehicle sleeping issue.

I will look into the handbrake example in sedan_BP though as of now, since the vehicles spawn while sleeping, I have achieved the same effect. Although touching the vehicle does make it wake.

Thank you!