VR in game joystick help please

HI, I have what is probably an easy task for most that I’m just having a heck of a time with. I wanted to start a claw/Crain game in VR. I made a joystick object and constrained its movement and rotation except for its X and Z rotation and I can grab that with the XR interaction and move it around as expected .

Now I would like to get values from that rotation(the joystick object) and make a 2ed object move along its X and Z . I built a graph that kind of works (pictured) that gets the Angle from the stick and transforms it to the 2ed objects position but the issue is since the joystick starts at 0,0,0 … on play the 2ed object jumps to the worlds 0,0,0 and starts from there. I think I need to have the 2ed object move on its own x,y,z and not the worlds X,Y,Z but not sure how to do that.

if you know how to fix this or even better a proper way of doing this task ,please let me know. Thank you

If you look in the scripting manual Unity - Scripting API: Transform (unity3d.com)

You have:

localPosition Position of the transform relative to the parent transform.

position The world space position of the Transform.

So you need local position.

Thank you for the info , but i rebuilt it all with local pos and it still would not work after 3 days … still jumps to worlds 0,0,0 . i got it to work in Unreal so I may just build the game there since its easier to make object A rotation = object b position … Thank you again

I did get this to work using IF statements to change the direction …so thank you