UE5 Add Force issue

I have an issue with the Add Force node in UE5. If an actor has initial velocity then applying accelerations less than about 30 cm/s^2 with the Blueprint node Add Force (with Accel Change is checked) causes an abrupt change in velocity, namely, the velocity drops sharply to about zero and then fluctuates around this value. It looks like the actor’s movement starts to stutter after a slight acceleration. Applying accelerations above 30 cm/s^2 does not cause problems, and the speed of the actor changes smoothly.

It seems that only acceleration matters. You can uncheck Accel Change in the Add Force node of the BP_PhysTest blueprint and manipulate the mass of the Cone component while keeping AccelerationMagnitude constant to achieve the same behavior (setting AccelerationMagnitude to 300 and mass to 9 causes no issue, while setting AccelerationMagnitude to 300 and mass to 11 causes stuttering).
Also Add Force At Location node seems to have the same issue.

My GPU: GeForce GTX 970 (Driver: 456.71)
(After updating to the recommended (current) version 512.15, the issue persists)

2 Likes

I have a feeling the physics object falls asleep if its below a certain velocity.
You can check this by selecting the physics component (cone) and then find the “On component Sleep” Event and just print a string if it’s firing.

If that’s the case, you ran into the same bug as we did → Sleep Family / Thresholds ignored - Physics abruptly stop - #5 by Homerdu291

2 Likes

Thanks, I checked as you suggested. The cone fires the “On component Sleep” event every frame but never fires “On component Wake” despite it moves very slowly (stutters) after a small acceleration is applied. I’m not sure which is the cause and which is the effect here. It seems that applying small accelerations triggers some optimization logic which erroneously drops the velocity to zero which in turn fires the “On component Sleep” event. On the other hand, linear damping alone slows down the cone smoothly even though the acceleration tends to zero along with the velocity, but in this case cone falls asleep early as described in the topic you mentioned.

2 Likes

Great news from the Epic team: the issue has been fixed internally and is expected to be available in the 5.1 release (details Unreal Engine Issues and Bug Tracker (UE-149771))

2 Likes

I am on unreal 5.1 and seens this issue is not fixed. I’m adding force via c++ to simulate gravity interaction between 2 objects. If i put an object on x and add an impulse to it in the opposite direction respect to the other object, I expect the velocity vector to drop to zero and then reverse due to the attraction of the other object and then start moving in the opposite direction (until it collides with the other object). But when the velocity is next to 0, it keeps swinging around this value and the object remains stationary. I dont know if im doing something wrong or if there is a workaround but i haven’t found any solutions for now

1 Like

This is probably due to an undesirable transition to the sleep state. The sleep threshold can be set in the Physical Material with the Sleep Linear/Angular Velocity Threshold parameters (physical materials seem to be the only place where the sleep threshold setting has effect in UE 5.1).

Okay thank you, I have found by myself that I was also putting a mass too small and the acceleration was also very very small, but I will try anyway your solution because I think with a small mass the error still exists

1 Like

Sorry for the late, I have tried your solution and now seems it works well. Thank you very much