How do I get the global rotation of a child node of another node? I am trying to add an arrow instance to the world/main/root node of the scene. I am adding it to a bone attachment, since it is perfectly aligned to where the arrow actually is. I've tried a number of things getting closest with...

x.rotation = arrow_loc.global_transform.basis.get_euler() "x" being the new instance..

it "sort of" works, but it's not really aligning properly. I've double checked their local space orientations and they match...so it's something with how I am applying the rotation. I hope this makes sense.

Any tips?

I'm not completely sure what you're asking, but, if you're asking what I think you're asking, you should be able to create a "global_vars.gd" script that extends Node and contains a global_arrow_rotation variable. Go to Project > Project Settings > AutoLoad, find the script, and give it a name like so... Now, add the script and make sure Singleton is enabled. In the arrow's script, write something like this... global_vars.global_arrow_rotation = rotation Finally, from any other script, you'll be able to access the arrow's rotation as global_vars.global_arrow_rotation.

I hope this was helpful!

@cybereality : playing around with it...I'm sure I've done something "funky" somewhere, but I have to multiply the euler.x by 2.2 to get it to match...it look correct, but I need to do further investigation e.g. print out both angles to see how closely they match...but I didn't need and xform or to_global() etc... just odd behavior...which is why I think I've done something wrong...but it works, maybe I'll stumble upon whatever my issue is later(fingers crossed) for now I just need to get everything implemented I have planned, then I can go back and see what crazyness I did wrong. Thanks for your respons though. @CopperyMarrow15 : Sorry, thanks for your advice, but that's not what I am looking for :)

a year later