VR Throw/Detach actor lag

Hi,
I am working on VR multiplater for oculus quest. I have dificulties with smoothly throwing objects. I tried many things and I am stuck - maybe you could help me?

Recently I have started using smooth sync plugin - but that did not change anything unfortunetly.

Right now I am:

  • grabing actor and attaching it on server
  • when releasing grip I am detaching actor
  • then I am enabling physics
  • and lastly I am calling SetPhysicsLinearVelocity to apply force to object

When in standalone it works very well - but running as Client (or especially when testing on dedicated server) there is quite noticable lag before the object detaches …

I have tried making grab/drop functions multicast - that did not help.
I have tried disabling replication and enabling when it hit something - that helped but after enabling it back there were wiered jitteres…

I have tried increasing replication frequency etc. but nothing helps … any ideas? Let me know If you need more details.

Hey I know it’s been a while but did you ever find a solution for this? I’m measuring the velocity after it’s been thrown locally and making server apply the impulse using that velocity, which works ok and gets it synced with server but it’s not perfect

Hey there @xadamxful! In my experience it’s a bit tough to get the feel right. I don’t have a good 100% answer, as I used the same method as you in this case, but it’s quite hard to get everything to feel perfect server side when it comes to physics. I eventually gave in and tried another’s solution, this plugin has a solid setup for replicating grips and the velocity in which the grips release. It’s not perfect, but it is much better than trying to manually handle the forces.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

https://vreue4.com/

More accurately, their entire VRchar and grip setup was outright better than my custom implementation, and was already ready for replication out of the box.

1 Like