FGear Vehicle Physics (v1.4)

hi, thanks for the suggestions.

-we could separate driving assists and maybe telemetry from AFGearVehicle class but i do not think that it would fully prevent your inheritance problem.

-we will look into the physical material and the skeletal mesh component issues.

-replication and backfire are in our todo list.

-unfortunately these extra platforms require a lot of effort to support and we do not have the hardware for mac/ios and we have little to no experience with linux. i believe you can manually compile the source for any platform since there is no external dependency except a few unreal plugins.

there is an issue that breaks the library if you want to manually compile with visual studio 2019

solution1 : stick to vs2017
solution2 : try the workaround mentioned in this topic.

Hi all,
I am the other programmer in this project. Multiplayer(replication) added. Iā€™m testing. If there is no problem we will post it in the next update.

How is it going with the update?

a little more things to be done, we will try to release before december.

Really looking forward to this plugin and the update. Hopefully some of my suggestions have been taking into consideration :smiley:
Keep it up!

Iā€™m using a now abandoned vehicle physics plugin and Iā€™m looking for a new one and just ran across this. So far, most things seem really great. I just had a few questions.

I need the following:

  1. Change any transmission value in realtime (changing the number of gears and their ratios). Change from automatic to manual and back again in realtime (looks like this is supported)

  2. Change any engine value in realtime.(looks like this is supported)

  3. Change any suspension setting in realtime. It looks like this plugin supports most of what I need, but Iā€™m not sure if I can ā€œliftā€ or ā€œlowerā€ a suspension in realtime since this plugin uses the resting pose of the rig as a reference. I need to be able to swap in a ā€˜lift kitā€™ into a vehicle to raise it for use with bigger tires. Then put in ā€˜stockā€™ suspension to lower it back down for use with smaller wheels/tires. The plugin Iā€™m using now lets me adjust the suspension length in realtime and that seems to do what I need.

  4. Changing the mass of the vehicle depending on whatā€™s equipped to the vehicle in realtime. My game is a car combat rpg, so equipping different armor, engines, weapons, etc. all affect the weight of the vehicle. From what Iā€™m reading, that is not supported.

  5. My game canā€™t have ā€˜auto-reverseā€™. When I hit the brake, I need it to just brake. Reverse requires shifting and using the gas pedal to accelerate in reverse (just like a real car).

From what Iā€™m reading here, 1-2 looks like itā€™s supported and Iā€™m not sure about 3-5. Let me know! Thanks.

hi,

1,2,3 are already possible.

4 will be possible in the next version : mass, center of mass offset and inertia scale will be editable during runtime.

for 5 i assume you need an auto-gearbox without auto-reverse, i will add an option to disable auto-reverse for the next version.

about the next release, we are in the testing phase right now, it will be available in a week or two.

Looks great!
Will you add support for vehicle with less than 4 wheels? Trikes and bikes?

no, there is no such plan.
you can fake it though(by keeping the left/right wheels at the same spot and/or disable one of them).

Glad to hear 3 is already supported.

Correct. The automatic transmissions in my vehicles are normally driven in ā€˜driveā€™, but can shift into other gears like a normal automatic can: park, reverse, neutral, 1st, 2nd, and drive. Then I have a toggle between drive and reverse. Thanks for including this! Thatā€™s great to hear.

Awesome! Iā€™ll be on the lookout for the new version.

updated sandbox demo is available

two additional setups are included, these are using the ArcadeAssists component.

  • drift : easy to drift, hard to control.
  • arcade : minimal understeer & oversteer, easy to control.

about the upcoming update, we have got troubles with the 4.23 version. replication works fine with 4.22 but problematic with 4.23.
we only synchronize inputs in addition to regular actor replication but somehow clients can get out of sync with the server. we will look into that for a few more daysā€¦

@**lazybitgames**Have you guys worked on any AAA racing game, since your work is great? and any video showing the last update regarding drifting?

Thanks

thanks for the compliment :slight_smile: no we havenā€™t worked on any AAA title.
we might upload a video before the next release.

Looking foreword for the video. I forgot to ask, is there are any support for Racing Wheels like logitech g29 or any common racing wheels? or maybe add it to the future plan?

you can use a steering wheel and gearbox, i do have a g29 and i have tested fgear without problems, there is no forcefeedback though.
there is a sample forcefeedback script in unity version, we could add a similar optional component in the future but we do not want to add external dependencies to the library. may be we can just provide the source code of the component without including in the plugin, we will consider it when the time comes.

Yeah that will be great, or even a short video on how to to that. anyway Iā€™ve added the asset to my wishlist, once I get it I will get back here asking for these extra things. till then good luck guys with your project.

I went ahead and picked this up earlier today and got a vehicle setup. Iā€™m really impressed so far. Once I set a smaller box collision for the inertia collision and a separate mesh for regular collisions, everything works really well. The vehicle out of the box handles great and behaves like a vehicle should.

Iā€™m not seeing any options to set the torque curve in real-time. Not sure if Iā€™m not looking for the right thing or if this isnā€™t possible? This is something Iā€™m going to need for my game.

I was also wondering how you got the info on the telemetry screen that says ā€˜108hp@4100rpmā€™ and max speed in each gear? Iā€™m assuming it was some kind of math, but I thought Iā€™d ask since Iā€™d like to use that info in my game. Thanks!

hi, glad you like it.

you can get the torque curve with ā€œUCurveFloat* UFGearEngine::getTorqueCurve()ā€ method and modify it, there is no method to directly set a new curve, i will check if such method is necessary and include it in the next release. you can also scale the engine torque with the setTorqueScale method.

engine power is calculated with ā€œUFGearEngine::calculateMaxPowerā€ method but it is not currently available in blueprints, i can also make it blueprintcallable if you need.

transmission speed calculation is in ā€œUFGearTransmission::refreshParametersā€ method but currently there is no way to access those data. just like the others i can add a new function to access these data.

Iā€™m only using blueprints, so Iā€™m only able to get the torque curveā€™s name right now. My game has a ton of vehicle upgrades. I have straight 6 motors, several v8ā€™s, a v10 and some diesel motors. Then I have different pistons, crankshafts, intake manifolds, etc. So I need to be able to set the torque curve for each motor since theyā€™ll be very different from one another. With the previous plugin I had, I was able to do this at runtime and it worked well.

That would be awesome. I was hoping to show this info when a player is deciding on what upgrades to use on their motor and give them a preview of the power gains and speeds in each gear.