Replicating Physics Handle Doors

Hey folks!

I am making a spooky horror game following tutorials online. At this point I have moved beyond just copying what I see in tutorials and can happily code on my own. The problem is, I am making cabnets, drawers, and room doors that can be opened via a raycasted physics handle.

I have several issues that have gotten me to literally take off my hat and throw it across the room while screaming “WTF!!!” at my monitor.

For an example of the type of physics operations I am talking about, here is a link to a similar type door in the original tutorial I started with.

My modern version is nearly the same as any other physics handle gun you can find in a million places online. Not only is it the same, it works exactly as intended in a single player situation. I can open and close doors and drawers, I can pick up and carry objects. If I were trying to make a copy of Amnesia I would be set.

However, I am trying to make it a coop MP spooky game, and I want the same controls. I can get it to partially replicate, as in when you move a crate the crate moves for everyone. However, it quickly gets out of ‘sync’ and the replication is clearly not accurate or reliable enough for a MP game that lasts more than a few moments or object uses.

Basically, I ask the wider Unreal community on any method using BluePrints to replicate physics controlled doors, drawers, and carryable objects in a smallish MP setting. Maximum 6 players tops. I will post an image of the latest of my attempts to get replication working after multiple tutorials.

Pls help.

Hey there, afaik when you set the object to simulate physics it will stop replicating, because that would be too many updates for the network, i know there is a way to manually replicate the physics bone transforms, but it requires a bit of c++ code.

Well I am not afraid of some C++ work, I am just not sure if I can mix and match my BP work with C++ work?

Also, any idea where an example of this potential C++ code can be found?

Of course you can mix BP with c++. The thing that i did is a bit network intensive, so i think it’s only really viable for LAN, but here is the link if you want to check it.