I’m currently testing out a few ideas. And one of them involves ragdolls, which actually affect gameplay, as physical objects, for example as obstacles, or objects players are expected to further interact with. So it is crucial to keep ragdoll positions and their poses in sync.
So, is there any way to replicate ragdoll physics from server to clients in UE4? If not, is it worth to try and find a blueprint-based workaournd for that? Say, each tick grabbing position of each ragdoll’s component, and forcing clients to transform it the same way?
Blueprint solutions preferred, however if it can only be done through C++ - I could consider those options as well.
i think physics is not replicated because of heavy calculations… im not sure if this is possible in BPs…
I really dont know what you want to do, but imo one option is to replicate actor position with “ragdoll” attached and do client-based physics body simulation… for example if you throw “player’s body” 100m away, everyone will see where body is but it will be unfolded on every player PC differently
Well, I don’t think that “calculations” are the reason for not replicating something. It will just put more stress on the server PC, and network bandwidth, while clients with just have to position objects at give coordinates.
The way I see it, is that ragdolls could be replicated the same way as any other physics enabled object is, in unreal. Basically, server simulates the motion, and just sends coordinates of each joint\object to the clients. It’s just about how many objects there are. So I’m looking for any built in functionality for that.
replicating only one object is an option, of course.
What I’m trying to do is ragdolls damaging other characters. Imagine a grenade going off near a few characters. It kills them, and launches their ragdolls into the crowd of other characters behind them, and they have to kill or damage those other chars on impact.
It works perfectly fine in singleplayer, with true collision detection and impact force calculations. Now i ‘just’ need to replicate it
Question is - how do I do this? What is the correct way to do this? I did not find a way to set bone rotations on animated skeletal mesh through blueprints. Posable mesh seems like it does not have an animation blueprint. And I also do need a ragdoll simulation capable of shooting out Hit events.
I’m missing something, I think.
I don’t think that clients really need to simulate anything gameplay-specific in my case. All gameplay-influencing physics calculations could be handled by the server.
Oh, excuse me, I didn’t read you were trying to simulate bone physics. I merely thought you wanted to sync regular physic objects. I can’t really help with skeleton physics, I’m still very new at that myself.
However, it’s for predicting movement for Pawns that use PhysX and not much else. PhysX replication is hard and expensive, and tbh you’re better off changing the game mechanic to avoid replicating bone transforms.
Ragdolls should be made to not affect gameplay. Gears of War 2 actually had some fairly critical online problems because of this.
Not if you want to actually make it possible to kill someone from collision with a ragdoll. And my ragdolls don’t even have a lot of jonts to simulate. Each one has about 4-6 simulated objects, but it’s just much more convenient to use ragdoll, rather than building it out of multiple objects manually. I don’t see a lot of difference between replicating 8 separate objects, or a ragdoll with 8 objects, in terms of bandwidth and calculations. Is there?
Other than that, yeah, probably will have to find a workaround, or limit it to singleplayer for now.