Will version 2 be a separate product? Would I have to buy the plugin again?
Having in mind the 2.0 will be a rewrite, probably with wheels collisions and other features i guess will have to buy the new one or maybe with some discount if we already got 1.x .
itâs a bit early to talk about it but itâll probably be a separate product that 1.x owners will be able to get with a discount. it wonât be a simple rewrite but an overall redesign of the simulation and will have some new features.
@lazybitgames after putting pooling on the back burner for months, I attempted it again and I am still having issues pooling Fgear vehicles. When tick is re-enabled on the Fgear mesh, it is not depooled to its original position. You mentioned a while back about a vehicle.substeptick function but I donât see it anywhere. Iâll definitely be upgrading to a 2.0 version but any insight on how to tackle this would be appreciated. Also is there a way to override waking up vehicles that are in close proximity to each other? When vehicles are pooled, I would like them to stay sleeping until they are depooled.
Iâve personally implemented vehicle pooling with fgear years ago with unreal4 so it is possible. I donât understand what your problem is, you need to basically re-activate everything and put it back.
you can manually sleep or wake a vehicle by calling vehicle.sleep/vehicle.wake functions but even if you make it sleep it may wake back up due to any collisions so you canât force a sleep. try calling sleep, disable all ticks including all components, disable collision etc. and revert everything when you want to respawn a vehicle.
Noted. Thank you. Also please for the next update, if the vehicle has no physics asset, just throw a warming screen instead of crashing the editor completely.
@lazybitgames My client car has a visual glitch: Its floating and shaking up and down only on server side , but when I press F8 to go to spectator mode it stops glitching for some reason , when I enable server authoritative the shake stops but the wierd offset doesnt
are you sure youâre testing it right, it says standalone in your screenshot.
a client in client authoritative mode simulates locally so it can not shake or anything, other clients may be⊠make sure your root bones are placed at zero(0,0,0) origin.
it was the root bone location man , tysm
@lazybitgames hope you and the team are doing well. Any suggestions on how to get a delegate when the vehicle is in reverse? Right now, we get one once the gear is changed. Also any update on when the wheel trace channel can be individually filtered? Cheers
why do you need a separate event for reverse gear, just check if the new gear is -1 with the gear changed event.
sorry, there is no eta for the next version right now.
@lazybitgames In FgearWheel, about ABS, this line:
mABSActive &= FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
Not should be just â=â without â&â ?
mABSActive = FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
And why the âbool activate = mABSActive;â Âż?
Why not just:
mABSActive = FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
if (mABSActive)
{
float scaler = 1.0f - mVehicle->getABS();
deltaV *= FMath::Max(scaler, 0.001f);
}
else if (mHandbrakeActive)
{
deltaV *= mVehicle->getHandbrakePower();
}
we want to eliminate a false positive case there.
so that &= cannot make it true unless itâs already true but it can make it false.
it doesnât actually effect the behavior but we may want to display an ABS icon on screen with AFGearVehicle::getABSActive but sometimes even if the ABS is activated we donât want to show it to the player. thatâs why we clear the state here.
using a direct assignment like you suggested will break the logic, we need the original mABSActive value for the if case.
Also, there is no other way to get the car angle correctly in all scenarios?
Using âmVehicle->getSteerDeltaAngle(true)â (or âfalseâ for rear) the problems are:
1.- On reverse they are always -90 or 90.
2.- When car on still erratic -90 or 90.
3.- When hold brake and almost stopped, cornering, 360Âș⊠same problem.
Due using carAngle for my EBD system had some bad behaviour that thought it was messing with ABS but after more debug found it.
Car angle not works as it should or it works as expected due was built with that limitations?
Im looking into AFGearVehicle::getSteerDeltaAngle, but too much maths for me.
Any chance to get fixed/improved? or any workaround?
@lazybitgames Also found a possible bug, when you disable âallow wheel rotation against engineâ, when the speed goes to 0 it does some push-forward, and when it goes to 0 again does the same always.
Here a video:
You can see that when car stops it goes foward like something pushed it. But no key presed or similar. Âż?
EDIT: TEsted in all cars in FGearExample and all does the same more or less.
EDIT2: Seems on 162 is fine, later 1.7 and 1.8 does this. Still schecking to confirm 100%
EDIT3: It looks on 1.62 thereis some Poxwer-Hp and Torque that remains static when car is still. Later +v1.7 when car is still, power-hp and torque goes to 0, and when torque get -0 this push happens. Testing and seems with mSpeedOverflow editing kind of fixes but i dont think is the way.
getSteerDeltaAngle finds the angle between vehicles heading direction and the velocity at front or rear axle center so it is undefined when the vehicle is stationary. we use it for certain assist features and those assists are only meant to be used while going forward. overall it gives correct results for itâs use cases and it doesnât need to be fixed.
the math is not that complicated so you can easily implement your version of it that handles those edge cases you need fixed. basically there are 3 directions needs to be found:
dir1: the heading of front tires (heading of vehicle + steering angle)
dir2: direction of velocity at front or rear axle centers
dir3: the heading of rear tires (same as heading of the vehicle)
then find the result as:
result = front ? angleBetween(dir2 dir1) : angleBetween(dir2, dir3)
right Allow Wheel Rotation Against Engine seems to be broken with recent changes, luckily itâs an unrealistic feature and it can be skipped, I might remove it in the future.
Well, maybe easy maths for you :P, but if is not gonna fixed and i need to do my own âcarAngleâ to cover all scenarios will leave for later.
â
The bug/bad behaviour im trying to fix now, with automatic reverse disabled, on brake, i expect the car wheels NOT rotates against the engine, but they does, thats why i was trying to use that feature.
If the wheel has some speed and on turning or whatever, i hold brake(without accel pressed and ABS=0), the wheels slow down that in some cases there are negative values.
I think they not should do, how to fix that?
Some video:
Btw, is the third time im trying to use a supposed deprecated feature/assist, so please, in next version do some cleaning.
EDIT: Tested on Dirt4 and DirtRally2 and wheels got locked, i cant appreciated any reverse speed on wheels in this scenario.
Tried to fix the carAngle to work with my needs. What you think?
Still testing but seems it does what expected.
// My :: carAngle :: | Iteration 3
// ----------------------------------------------------
// Angle=0 if speed lower than 0.001 (avoid noisy)
if (vel.SizeSquared() < 0.001f) return 0.0f;
float angle = front ? FGearUtility::SignedAngle(dir2, dir1, FVector::UpVector)
: FGearUtility::SignedAngle(dir2, dir3, FVector::UpVector);
// Manage any direction (Forward & Reverse)
angle -= ((angle > 90.f) - (angle < -90.f)) * 180.f;
return angle;
// -------------------------------------
Wonder if will be safe add the fixes on the official function Âż?
if it works for you then youâre good to go. as I have said earlier original version is not broken, it gives correct results for itâs use cases. users can create their own versions(c++ or bp) based on their needs just like you did but your version would change the behavior so itâs not a good idea to replace it.