as some of you might already know, I switched from physx to bullet, and am now implementing further vehicle physics (arcade).
I already implemented simply suspension in physx and tried to 1:1 translate it to bullet, but somehow the same code act’s weird. (Vector and Unit translation for scale and the coordinate system work correctly)
I do have suspension, but the damping doesn’t work at all, and it seems rather stange to me, since I made sure that I properly initialize everything and also debugged through the code, the damping in fact gets applied with expected values, but in the end-result
it doesn’t have much an impact, or rather none.
So, the basic principle of the suspension is the following:
//How much the spring is compressed. More compression = more force float SpringCompression = FMath::Clamp<float>(1 - (ImpactDistance / SuspensionLength), 0, 1); float SuspensionForce = SpringCompression * SuspensionForce; //Damping float DamperVelocity = (SpringCompression - Wheels*.PreviousSpringCompression ) / DeltaTime; float DampingForce = DamingConstant * DamperVelocity; SuspensionForce -= DampingForce; PhysicsBody->appylForce(SuspensionForce * WheelUpVector, WheelLocation);
But the vehicle just keeps jiggling all over the place, even changing the damping to extreme values hardly has any influence, at suuuper large values, the vehicle just launches into the air, as expected, but every somewhat reasonable value (up to 100000), doesn’t seem to have any impact at all, and I just can’t see why.
I tried it with the values I used for the physx suspensions, Suspension Force: 100000 and Damping: 800, the scaled down version to bullet dimensions 10000 | 80, also 10000| 800, 10000 | 5000, 10000 | -500…
Even negative values don’t seem to change much. I would expect the suspension to exponentially increase, because of negative values.
I am totally on the wrong path, I fear. Can someone help me, please?