I'm building a spaceship game for Oculus Quest. Inside the ship I added a lever to control its speed which has a rigidbody and an xr grab interactable component attached to it and a hinge joint as well. The lever works well when the ship is stopped but if it's moving, when I grab the lever it immediately disappears.
Both "Ship" and "Ship bridge" objects have rigidbody attached with gravity turned off and kinematic turned on.
To move the ship I wrote this script and attached to the Ship object:
private void FixedUpdate()
{
moveDirection = new Vector3(0, 0, -0.1f);
transform.Translate(moveDirection, Space.World);
}
I tried turning on "retain transform parent" in the lever "xr grab interactable" component and I tried adding an interactable event to keep the lever as child of "Ship Bridge". None of those do anything. (https://i.stack.imgur.com/h9vJd.png)
I don't understand why it disappears when the ship is moving.