Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | veridical |
Hey guys im pretty new to godot, and Im having this weird problem where if the node isnt on 0,0 then its creating an offset, ill have a video linked below showing what im talking about, do you have any ideas on how to fix it? Thanks!
It probably has something to do with local positions (relative to parent) and global positions.
exuin | 2020-10-10 04:33
do you have any ideas on how to fix it? all of the nodes are linked and they’re getting the global position of the mouse
veridical | 2020-10-10 04:37
I guess you could try using the to_local method to change the coordinates.
exuin | 2020-10-10 06:24
no dice yet ill keep trying though, i might just have to start at 0,0 then move it in code to the location i want
veridical | 2020-10-10 06:44
I’m not really sure how moving it in code would help, since the end result would still be that the node’s coordinates are different than global coordinates.
exuin | 2020-10-10 07:05
Would you mind providing a code snippet describing the general idea of how you add the lines? I think the issue may lie in there.
netimu | 2020-10-10 18:18