Controller tracking with transform updates

Godot Version

4.3 beta 3

Question

Hi, many thanks for all the work on VR support in godot and the xr tools. Unfortunately, I’m having some positioning issues with my vr setup in Godot. I have a scene where I manually set the transform of a root node that follows a path in its _physics_process. The root node has the XROrigin (and XRControllers etc) attached as children. However, when the root node “moves” at a high speed, the XRControllers start to lag behind. It looks like they are positioned relative to the root nodes position from the previous tick.

I thought this could be solved by the root node calling force_update_transform() after setting the transform and assigning a priority of -100 or something to have it execute before the controllers do their positioning. Unfortunately, that doesn’t fix the issue. Maybe there’s some other solution to this?

If you are using something like XR Tools Collision hands it can by a physics priority thing as the placement of the hands becomes disjoint with the controller position and placing the hands before moving your origin (or its parent) will cause things to lag. Indeed working with the physics priority setting on the node can ensure you’re handling things in the right order.

If you’re not using a technique like collision hands but just have your hand mesh as a direct child to the XRController3D node, it should render correctly even if the parent is moved. But I have ran into situations in the past where this failed, and Godot did not update the transforms in the rendering server for the child nodes. I was never able to find out why. Though I haven’t seen this failing since moving to Godot 4.