My current project’s gui fails to pick nodes during on_input. (using action’s x and y) I have another project with a similar gui set up which works fine. So I’ve done something wrong. I tried a test suggested in another Question post. [get the node. Get its position. Test the position with gui.pick_node]
…but the test fails. I’m using default settings, plus Monarch. Could that cause this problem?
(see the print output outlined in red at the bottom of this image) There are no errors listed in the console output.
I’m using the default render script. Nor am I making any calls to DefOS (yet) .
However, I was able to get the test code to work on a text node at the root of the Node folder. So it sounds like the Tools box is messing with its subordinate boxes. Doesn’t pick_node handle all the hierarchical coordinate deltas?
After investigating the differences between the non-working project and the working project, the only significant difference I can find is that the non-working project has its gui inside a game object inside a collection that is treated by Monarch as a screen. Could that be relevant?
DEBUG:SCRIPT: vmath.vector3(-240, 480, 0)
DEBUG:SCRIPT: false
DEBUG:SCRIPT: test's up
DEBUG:SCRIPT: picked: 01_bigTree
ERROR:GAMEOBJECT: Instance '/scriptsObj' could not be found when dispatching message 'set_the_brush' sent from Worksheet:/works#piecesTools
It looks like I’m able to pick the item, at least based on the log output. But there is also an error about a missing game object instance.
Thanks for running the example. I don’t get that error, but it did pick the right object. So the reduced version works. (I didn’t see it because gui.get_position returns the object’s relative position, and the highlight goes into negative land. (my bad) )
So I took the working, minimal example and re-implemented the removed functionality. It’s now working. What can you do but call code black magic sometimes?
EDIT: I figured out why you got the error. There was an obsolete script file that my copy found that’s not in yours. So the message couldn’t get passed. Whereas, on my system the message went to the wrong file. I wish I had gotten the error!