Dedicated server is always simulating skeletal physics on the PhysX level, no matter how bEnablePhysicsOnDedicatedServer is set
By default, physics simulation of a SkeletalMeshComponent is disabled on a dedicated server, so as to save resources. It can be enabled by setting USkeletalMeshComponent::bEnablePhysicsOnDedicatedServer=true (see https://answers.unrealengine.com/questions/104567/ for some issues). However, PhysX is internally simulating the skeleton no matter how this flag is set: bEnablePhysicsOnDedicatedServer has no effect on PhysX level.
This can be seen by connecting the engine to the PhysX Visual Debugger (PVD) and looking at the PhysX's internal scene with bEnablePhysicsOnDedicatedServer left at it's initial default value (false):
UE: the skeleton stays still
PhysX: the skeleton stays still, but accumulates gravitational velocity (thus, PhysX must be simulating it. it doesn't move due to UE constantly overwriting the transformations of the skeleton's PhysX bodies.)
If physics simulation is enabled at a later point (skel->bEnablePhysicsOnDedicatedServer=true; skel->SetSimulatePhysics(true)), then the skeleton will immediately start falling at a high speed, due to the accumulated velocity.
(I did not take a look whether the accumulated velocity is visible also on the UE level; I stumbled on this by accident while tracking a different issue in PVD.)
@oricohen: You seem to be working on this topic and might want to take a look at this?
asked Sep 26 '14 at 01:39 PM in Bug Reports
I just tried this out in 4.5.0 and it seems that this issue has been fixed! :) With server physics off, a representation of the ragdoll is still created on the PhysX level (by design?), but the ragdoll does not anymore accumulate gravitational velocity. Also, it is now shown as blue in PVD (meaning disabled, I guess?) until I enable server physics (skel->bEnablePhysicsOnDedicatedServer=true; skel->SetSimulatePhysics(true);), at which point it turns green and starts to gradually fall with no incorrectly accumulated initial velocity.
I re-checked this in 4.4.3, although with a slightly different setup. The ragdoll is green in PVD all the time (and accumulates gravitational velocity) even when server physics are off.
Just out of curiosity, please share if you know anything about which change might have fixed this? Thanks! :)
answered Nov 07 '14 at 11:43 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here