Download

Od problem with skeletal component and physics in multiplayer.

Hello am having a very od problem related to a skeletal component/ mesh and physics simulation.
The skeletal mesh is not playing any animations just for clearety.

Now if i set simulate physics to true after a game event has happend.
And everything works fine the mesh simulates physics and fall to the ground.
Running 2 clients and a dedicated server i when the event is triggerd the mesh falls and all seem ok.

But turns out that the location for the mesh/component has not changed on the server so if the player was to interact nothing happens.
Becuse the item is not at that location on the server.

So after some googeling i found this AnswerHub post.
https://answers.unrealengine.com/questions/97074/vehicle-template-issues-with-standalone-dedicated.html

Setting the the following members in USkeletalComponent::


	SkeletalComp->bEnablePhysicsOnDedicatedServer = true;
	SkeletalComp->SetSimulatePhysics(true);

What happens then is that the mesh disapears on the clients but is actualy located in the expected location, but just not visible.
Now way whould the mesh disapear when bEnablePhysicsOnDedicatedServer is set to true ?

Its maybe worth to note that the RootComponent of this Actor never moves.

Also here is a snip from the constructor on how its setup.


SkeletalComp= PCIP.CreateDefaultSubobject<USkeletalMeshComponent>(this, "Falling Object");
	if (SkeletalComp)
	{
		SkeletalComp->AttachParent = RootComponent;
		SkeletalComp->SetIsReplicated(true);
		SkeletalComp->bGenerateOverlapEvents = true;
		SkeletalComp->SetMobility(EComponentMobility::Movable); 
	}

Anyone had any similar experience working with physics and skeletal meshes.
I sure aprichiate any tips anyone have on the subject.
I found some on answer hub but am thinking this may be a bug?

Thanks
WCode

So turns out its not due to the skeletal mesh after all swaped the asset out for a static mesh and i have the same behavior.
When ever SetSimulatePhysic is set to true, the mesh disapears on the clients.

It do excist on the server as i have a event fire of when it hits the ground.
Now way whould this happen, the component is replicated in the Actor class and using a Singel Process will have the wanted results.

Do i have to manualy replicate the movement for the component?

Sure could need some help on this.

**4.5 Bug
**
This is actually most likely related to a bug I’ve reported experiencing in 4.5 which forced me to revert my physics-based game to 4.3.

Please add to the discussion here:

https://answers.unrealengine.com/questions/128514/451-i-had-to-revert-to-43-again-set-simulate-skel.html

I actually have a video showing my skeletal mesh physics simulating disappearing on the client, and this does NOT happen in 4.3!

Try it yourself!

revert to 4.3 (or 4.4) if you can and let us know!

:slight_smile:

Rama

Thank you for letting me know, this is a game breaker for us so i hope it gets fixed.
Now i can`t get over that i spent 5 days trying to figuer out this problem.
Was sure i had a networking error somewhere.
WCode