When a small external force is applied to the rigid body, the VSmooth value is reset in the ResetVSmoothFromForces function.
Since this function ignores the current velocity, a very small velocity is calculated and the rigid body goes to sleep.
The following workaround can solve this problem.
void ResetVSmoothFromForces(int32 Index) { // Reset VSmooth to something roughly in the same direction as what V will be after integration. // This is temp fix, if this is only re-computed after solve, island will get incorrectly put back to sleep even if it was just impulsed. FReal FakeDT = (FReal)1. / (FReal)30.; if (this->LinearImpulseVelocity(Index).IsNearlyZero() == false || this->Acceleration(Index).IsNearlyZero() == false) { // this->VSmooth(Index) = this->Acceleration(Index) * FakeDT + this->LinearImpulseVelocity(Index); this->VSmooth(Index) += this->Acceleration(Index) * FakeDT + this->LinearImpulseVelocity(Index); } if (this->AngularImpulseVelocity(Index).IsNearlyZero() == false || this->AngularAcceleration(Index).IsNearlyZero() == false) { // this->WSmooth(Index) = this->AngularAcceleration(Index) * FakeDT + this->AngularImpulseVelocity(Index); this->WSmooth(Index) += this->AngularAcceleration(Index) * FakeDT + this->AngularImpulseVelocity(Index); } }
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-154118 in the post.
4 |
Component | UE - Simulation - Physics - Solver |
---|---|
Affects Versions | 5.0.1 |
Target Fix | 5.1 |
Fix Commit | 19380083 |
---|
Created | May 25, 2022 |
---|---|
Resolved | Oct 3, 2022 |
Updated | Oct 19, 2022 |