Hi, so I am currently trying to make some kind of toolbox-system for vr in ue4. In my example case I modeled a simple ratchet and a socket. I made a system with which I can attach such a socket so the ratchet via AttachToActor.
The attachment works fine so far, now the thing is, when grabbing the ratchet (where the socket is attached) and move that thing around, the attached socket seems to be a bit wobbly.
More precisely, the movement of the ratchet is given further to the socket, but with a delay. So the socket seems to be flying behind the ratchet.
If I now stop moving the ratchet around, the socket moves back into its attached location.
So far so good. Now I gone even one step further.
As there exist extensions for ratchets where you put the ratchet on the one end, and the socket on the other, right?
I modeled such a thing as well and attached the socket to the extension, the extension to the ratchet.
This works as well, but the delay is still there.
The ratchet is grabbed by the motioncontroller. Now the delay is between the ratchet and the extension.
However, there is no delay between the extension and the socket.
How is that possible?
I mean, my assumption is that the attachement to the motioncontroller has something to do with it.
In VR there is a LateUpdate feature (don’t mess that up with LateUpdate from Unity engine, which is basically a late tick group in Unreal).
As u basically feel in VR (feel where your hands should be) and see where your hands are (virtual Hands), each bit of lagging behind can make you feel dizzy.
VR System is querried for positions on begin of a frame. 1 Frame to run through the GameThread.
Then GameThread work is pushed to the RenderThread. 1 Frame to run through the render Thread.
Means you get 2 Frames delay from actual hand position to the visual update. (dunno how much delay there is in the VR system that might add on top).
To eliminate some delay, the LateUpdate feature updates the transform the MotionControllerComponents at the begin of the RenderThread. But if the object that is “attached” to the controller is not updated with the LateUpdate, the “attached” object lags on frame behind.
All components that are attached (with attach to node, or in component hierarchy of the actor) are also handled in the LateUpdate. Components you give a transform manually, are not part of the LateUpdate.
LateUpdate can be disabled on the MotionControllerComponent. The checkbox is called “DisableLowLatencyUpdate”.
Using VRExpansionPlugin you can add additional components to the LateUpdate that are not directly attached as described above.