Download

Replicating Physic Handle?

Hi,

I am currently having issues replicating Physics that are being controlled by a Physics handle, when I debug my blue prints I can see that the server is showing the code executing completely however the physic static meshes are moving for clients…

I have followed TJ Ballards tutorial for picking up Physics Objects, and slightly adapted it so I can pull and close doors using Mouse axis input. (Dragging doors open and close).

https://forums.unrealengine.com/showthread.php?51915-Physics-Handle-Pick-Up-Physics-Objects-Tutorialhttp://

You see the blueprints in use in that tutorial.

All my variables are set correctly, the static mesh blueprints are set to replicate… Wonder if anyone can recreate have a go?

The end goal is to have Doors that can be open and close with mouse input, along with wardrobes, drawers etc… as well as having the standard physics object pickup. If this isn’t possible to do, is there an alternative that can be done with Matinee where you can make it seem like you’re dragging the door across a time line, but also be able to push the door by walking into it?

Thanks for your time.

Any help would be appreciated massively?

Create custom events… replicate those events to the server

Heres a 36 second video of it in action.
http://youtu.be/sYr0P2XY8IQ

forgot to mention in my previous post with the screenshots - it works perfectly fine. however if the client holding the object stops moving, the network code doesn’t see any updates - the clients drop the object

the object gets picked up again when the player moves again.

Wow thanks for this MrGrr,

I’m working from a Line Trace for objects, You spawn yours, I’m using Line trace so I can grab a door and have control over using it. Any idea’s how to slightly modify? Added you on UE4 chat.

this works - sort of. it has the same bug i’m trying to work out myself, where if the client remains motionless - local physics take over, as there are no updates over the network to the object.
eg, no mouse input from the client - no server update, no server update, physics object drops… but only on client side, not server side.

Part 1 - client side
b9aad4a3a923254f6a19d2ca164cd796e3bc8305.jpeg
Part 2 - server side

video demo
[video]Unreal Engine 4 - line trace physics handle replication example - YouTube

PS, i’m new to UE4 - there is probably a much better way to do this… i really doubt we should update a physics handle using event tick in a network environment unless i’m missing something, except i’ve found if i don’t update it in event tick, object motion appears laggy.

sorry about part2 if its cutoff- i didn’t post the remainder of the server part as it didn’t change.

We are getting somewhere here,

For me the client can update the server location… But not any other way… Can I see what comes after your Event Tick?

The only difference for me is I use the Camera Forward Vector and World Location and times it by a 150. I think what comes after our Event Tick is different.

P.S for someone who is new to UE4 you’re doing very well. I suspect previous dev experience?

here ya go:
380b9207851372bf94e583e998fb2673b1004686.jpeg

i started with the UE4 content example physics code as a base for manipulation(copy and paste) then modified until it’s in it’s current state useing the FPS template.
i stumbled on your thread looking for a solution to my own problem :slight_smile:

experience? a little bit of doing the same code in Unity4, have only used UE4 in my downtime since december i think? thats why my example was quite unpolished, and probably had much room for improvement.

just occured to me - make sure the objects you are controlling are replicated too, otherwise it’ll only move on the server side.

Yeah, it seems like you have to create a blueprint using the Static Mesh Actor as a parent, Also I noticed Physics Constraints in Blueprints causes doors to jam, however adding them in as level components does not give the same affect.

Need to change my door blueprint now so i can still keep the doorframe attached…

By the way thanks for the above!

How did you get the Object Types variable??borrar.PNG

Hello. I found your example of Physics Handle Replication incredibly helpful. Thank you for that. However, I am having the same issue you were having. Once Input from client has stopped, the object is dropped. Were you able to find a solution for this. I realize this was years ago. Thanks.

Try disabling gravity.

Does this work in this scenario?