FGear Vehicle Physics (v1.4)

Hi, may I have this example project? It is useful enough for my work. Thanks anyway.

we can not share this project because some of the assets are not free.
this demo contains some extra UI elements like minimap and rankings other then that most of things are similar to the sample project.
those extra UI elements will be included in the next version but i can provide them beforehand if you need, just drop me a mail.

regards.

Thanks for replying.
Actually, I just wonder why the replication movement work so excellent in your demo, but so poor in mineā€¦The vehicle had some abnormal twitch in client.
I have also tested replication in ā€œMultiplayerā€ level, which is in sandbox project, but got the same result.(ping is 35)
May I get some advice? Any help would be appreciated.

hi, first of all replication feature has no client prediction yet so it will not be excellent even with zero ping.
secondly the dead reckoning algorithm is sensitive to frequent frame rate changes and in some cases unreal does not give stable frame rates when the window looses focus.
for ex. when i open 2 instances(windows) of the demo and put them on different displays it behaves poorly but if i put them on the same monitor it works just fine. may be your problem is about something similar, so check your frame rates, if they are fluctuating too much try to eliminate that case.

Hi, awesome plugin, easy to use and plenty of customizations.

Iā€™m curious, what was the thought behind making all functions non virtual? For example, In my game I would like to have the steering to be less sensitive at small joystick axis values than at the maximum range. A curve that maps axis value to steering value would be perfect here. I would do this modification myself, but the methods are not virtual, so there is no way to extend functionalities other than writing directly into the plugin code.

Iā€™m using FGear for about a month now, and other than this, everything is fantastic!

thank you, glad you like it.

there is no thought behind it, core components are not designed to be extendable, it requires a lot more effort to make it extendable(i do not count making every function virtual as being extendable).

about your example, you can do it in a couple of ways:

-just modify the c++ source
-calculate inputs yourself and inject to the input module from BP
-make some functions virtual and override them in blueprint. i do not think this is an ideal way to do it because you want to modify the steering but there is no function specific to steering, you may need to do a lot more work here.

it is a debatable topic but since we provide the full source code you can just modify it for your specific needs.

It works!
So grateful for your advice.

Thanks for your answer, I have chosen the the second option. I really appreciate that the source code is fully visible, but I tend not to modify any plugin code, because if I decide to update the plugin later, then those modifications would be lost.

For anyone else interested, you have to call setReadInputs() of FGearStandardInput with false to disable the automatic updating, then you can call setInputs() with whatever pre-processed values you like.

Attention : If you upgrade to 4.25.2 you may not be able to package your project. The workaround mentioned below worked for me:

Hello,

first of all, it is a great plugin.

My question: is there somewhere also similar event like ā€œOn Brake State Changeā€ but for reversing (or atleast gear change event)? I want to turn on white light when reversing, but I have to do it manually (every tick compare current gear and if it is -1 then turn light on). Event would be better.

Thanks.

yes that is a good idea(added to todo list), we also did it by manually checking in our demo :slight_smile:

**lazybitgames: **nice. I also found a little bug:

(sandbox demo)

  1. on first car set gear to R
  2. take second car and push the first car forward
  3. the first car now driving forward with R gear and with higher speed will do smoke from wheels and skidding sound but it actually seems that will not slowdown the car at all

I think that car should decrease the speed fast, what do you think?

check documentation for ā€œAllow Wheel Rotation Against Engineā€ option.

Hmm, that will block the wheels. But when is rotation allowed, it should not do skidding, isnā€™t? Or when it should do skidding, then it should slowdown the car?

BTW, one more question: I have a car, that need to be started first. Is there any way how to block throttle (but not to block braking when have combined axis enabled)? I tried Set Throtthle Sensitivity to 0, but then I cannot brake when reversing (and also I can reverse).

it is allowed to rotate but it is still effected by a small engine brake and internal friction, that small slips can trigger skidding effect due to numerical precision issues and how slip is considered inside effects component, if you increase the ā€œlong slip thresholdā€ in FGearEffects component it can be prevented up to some extent.

there is no engine stalling in fgear so may be you can set engine torque scale to zero.

Torque 0 works, thanks!

Whatā€™s the best solution to not make a vehicle roll down a slope? Iā€™m setting the handbrake each tick when there is no driver.
And the stick tire option is set to 1.5 but this still doesnā€™t help.

there is no best solution, depends on the game.
you can try to define a sleep state, when vehicle should put into sleep mode you can set a high value to linear damping so that it can not move by itself and cancel sleep mode when needed.

How is it solved in the default vehicle system? It worked there.

it is most likely solved inside physics engine not the vehicle system, i will take a look anyway.