I’m using other objects as children of the camera and I want the child objects to always remain somewhere in the viewport. When the active camera is a FreeCamera, everything works fine. But if the active camera is an WebXRCamera, the movement of the child object appears to lag when the camera is moved. In some cases, such as when the camera collides with a specific obstacle, the child object is constantly shaking relative to the camera, what can I do to keep the child object consistent with the camera and avoid such shaking?
here is the playground.
i’ll check and let you know. Does it only happen with the movement turned on?
This is related to two systems:
- The collision system that calculates collisions on each frame (and bounces you off if you collide with walls)
- The movement feature (and not the teleportation module).
The 1st is a long standing issue. Actually, not an issue. This is the way the collision system works. It is configurable to avoid these bounces, depending on your usecase.
The 2nd - I will have to take a look at the movement update on each frame, which seems to update the parent camera a frame after updating the XR rig cameras. i’ll add an issue
Currently only found this problem when using MOVEMENT. The camera shake caused by the collision is acceptable, but the child of the camera is not aligned with the camera, making the child object visually shake all the time. And even if there is no collision, you can clearly feel that the motion of the child object is lagging when moving (but not when rotating),
This child object is generally a GUI object, and this lag can cause difficulties for users to operate. Thanks for the response.