It gives me more precision on steer for small variations, very useful on high speeds. The cons is that on drop the stick the steer goes to 0 instantly, which may cause issues in some turns/circusmtances.
With the original code, when you drop the stick it goes to steer 0 but smooth.
So, what will be the best way to fix and on drop the stick get the same results as with original code, or maybe i should edit in other line to get same/best results?
EDIT: I mean, sometimes looks they do some tremble when you drop stick.
EDIT2: Oh, yeah, because on drop the stick from max side left-or-right it not goes to 0, it may do some 0.01 right and left due that suddenly drop . Mm i guess i will need to do some comparision or do it bettween some max-min values to avoid this.
I think you could add some kind of linearity to your input, pretty much like Forza and in particular Racer implements. Where lower values provide more accuracy near the center but less accuracy near full lock. Higher values provide more precision near full lock but less accuracy near the center.
Yep, exactly, some linear is what i want to achieve too. Im bad at maths so not understand very well that formulas.
I tried something simple like a lerp in both cases and seems works enough. Still sometimes it looks not does 100% as it should, but much better now, i need various attempts too see any kind of “tremble” or “no smooth” effect on drop the stick and is very low/subtle. Im doing this:
Im still testing to see if i can really fix, if any idea or what add/change in that code let me know.
Btw, Lazybitgames, i guess some slider under “steer speed” curve on the BP to add the stick to the formula where 0 is disabled and any amount set the multiplier on mHorizontal to set the accuracy,etc… will be great for next update maybe?
If you never tried, this means update the inertia XY or Z at runtime maybe is not a good idea?
Don’t know how to get it working, i checked the FGearVehicle.cpp and there is a:
“void AFGearVehicle::setInertiaScale(FVector iscale) {”.
But dont know what to do inside the FgearWheel to set only the Z one for my case.
There is a “//store local inertia tensor matrix” - “mLocalIIT.M[2][2] = 1.0f / inertia.Z;”
But i guess this is from the physics one, i dont want to change the Z tensor on the physics, just the InertiaScale from Z on the Fgear BP.
This is the actual condition im working:
if ( mHasContact && mAccel > 0.0f && mLocalVelocity.X > 0.0f && mLateralForce.Size() > 1000.0f )
{
if ( mCurrentSteer > 0.0f && mLatFrictionForce > 1000.0f || // Left to Right
mCurrentSteer < 0.0f && mLatFrictionForce < -1000.0f ) // Right to left
{
// Higher *X works as normal. With lower it decreased the lateral force
//mLatFrictionForce = mLatFrictionForce * 0.5f; // Allows stop the car rotation for better aim on curves // Basic
//mLatFrictionForce = FMath::Lerp(mLatFrictionForce * 0.5f, mLatFrictionForce, 0.01f); // With lerp
mLatFrictionForce = FMath::Lerp(mLatFrictionForce * (mCurrentSteer/35.0f), mLatFrictionForce, 0.01f); // Better steer & counterspeed
}
}
So, i want to add a formula using mCurrentSteer & InertiaScale Z to see if it combines well to get the overall steer/countersteer behaviour im looking.
Can you give me the working code to set the inertia scale inside FgearVehicle? If maybe is too complex i can pay for that.
No, i mean, i want just the working code to edit the InertiaScale Z inside the FgearWheel.cpp . In the same way i can use variables to edit like “mLatFriction” etc… that allows me to edit stuff to get the behaviour i want for the car.
So, i need a variable, let say “mInertiaScaleZ” to play with, in the same way i can do with the others. Then i can put that variable in my formulas to edit the inertia scale Z where i want.
Adding “FMath::Abs(mHorizontal * 1.1f)” on SteerTime it seems to do that desired linear speed that depends on how much the stick is moved from center.
Also i set to “* 1.1f” due at least with my XBOX 360 gamepad and how i drive when i try to steer max, usually get around 0.95-0.90, so with that i get sure to always get the full steer speed desired.
Another addition was on “else” with “* 0.5f” for the steerTime. I have 9 on InputGravity for better countersteer, the bad thing is on drop the stick, the wheels goes to 0 steer too fast causing sometimes unwanted results. With 0.5, wheels goes to 0 steer more smooth giving a better driving feeling.
Still testing to be sure it works well in all scenarios, but looks promising.
I do believe @lazybitgames Will do their utmost to support UE5 and Chaos to bring this to the standards of UE4 PhysX and better. I do think that some engine fixes are required before this is possible and 5.1 (when its released) may or may not help but… I can’t talk for Yunus but I know his support has been superb from day one.
I’m confident we will see a fully stable Fgear for UE5 and I can’t wait for that
yes, we are planning to maintain fgear ue5 port until it becomes as stable as ue4 version but it depends on the stability of chaos itself. we are hopeful about the upcoming releases
it’s not correct, checked the original unity version and it seems that this was incorrectly ported. it’s very difficult to feel the difference so we have missed this for a long time.
I’ve migrated the changes into my modified plugin and they seem to work well - apart from Convex trace types, specifically on Landscapes, it vibrates like crazy (works fine on meshes though).
The biggest change in my personal version of the plugin is changing all the function signatures to match that of the Unreal syntax standard.
Is there any plans to update your code to match these standards?
I use Rider for Unreal and it was getting too noisy - so I eventually decided to resolve all the syntax warnings.
Could imagine others would be getting the same on their end.
Improvements would be the following:
Change signatures to start with a capital letter
Make use of const in function parameters
Convert getter functions to const (where applicable)
Update variable names to match Unreal conventions (this one is less important imo)
Alternatively, if you have the support capacity, perhaps owners of the plugin could be invited to a private GitHub repo and would be able to contribute to the plugin?
This is not uncommon with some other plugins I’ve purchased