We have a large complex project where we’re having issues with Async Physics and Physics Control (via Physics Control Component and Physics Control Asset). To repro and get to the bottom of it I assembled a minimal sample project in 5.7.4 which also works in 5.8 and reproduces there too.
The issue we have in our main project that led me down this path is we have creatures where parts of the creature are kinematic and parts are simulated. For example a kinematic head and root and simulated body parts, tails, etc. We are an underwater game so there’s a large amount of linear and angular drag on all bodies (3.92 linear, 0.735 angular). They always have completely locked constraints on all linear constraints and relatively lose angular constraints. The problem is that the simulated parts often don’t move at the same time as the kinematic parts and stretch away from them and then spring back. This often causes overshooting and extreme stretching. It is worse when there is low FPS (<30) and very noticeable when there are hitches.
I put together a sample project with 3 different ways of moving a sample rig, all have the same physics and physics controls. One moves the actor location every frame, one moves the actor location every few frames and smooths the skeletal mesh in the inbetween frames and one uses the stock CMC. All assets have world controls (just defaulting to 0,0,0) on simulated parts and some kinematic parts near the front. I put them in a test map and then tested with and without async physics.
I noticed the following:
- Without async physics everything works great with all movement styles
- With async physics teleport thresholds on the physics control were hit which were not when async physics was disabled (can test by setting teleport threshold to 300 in the physics control component in the sample project) causing bunching and jumps in the physics
- With async physics enabled and teleport disabled (to reduce variables at play) the physics constraints are entirely broken, locked linear constraints are not respected at all and bones are stretching 3x their length, drag appears to be multiple times stronger and the bone at the front (I believe root?) is far offset out of the front of the skeleton.
- CMC has slightly better physics than the other movement methods but still noticeably broken compared to async physics off, better velocity being passed to the sim maybe?
I have attached two images before one with async physics off and one with async physics on, everything else the same
Async Physics Off:
[Image Removed]
Async physics on:
[Image Removed]
Now I expect some amount of delay/physics being behind the gamethread/render with the physics being async or perhaps some cvar wrangling to get things working nicely, but in our actual project I have tried dozens of different options and none of them seem to help. The physics with async physics enabled are more unstable across the board (expected somewhat but this is more than expected) and constraints are not being respected at all and it’s causing noticeable stretching and bunching in our game with creatures that mix kinematic and simulated parts. I’ve tried various different options within the physics asset, physics control, chaos cvars including some intended to sync anim, game thread and physics frames in various ways.
Is there something we’re missing? We have to have async physics enabled for a completely different unrelated reason (was recommended by Epic to support another part of our project) so we desperate to figure out how to resolve this and I’m all out of ideas.
[Attachment Removed]