![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Afely |
Basically, I’m trying to get a node’s position rotated around it’s parent, then draw a line from there to a position that isn’t important to this question. I see two ways to achieve this, both of which I have no idea how to do:
- Use the Vector2.rotated() method on the local position and then translate it into global position.
- Rotate the global position relative to the parent node’s global position.
It doesn’t really matter which way I use, help with either one is appreciated. Thanks!
Any chance of providing an illustration of the important points here? For some reason, I can’t quite wrap my head around your description…
jgodfrey | 2020-11-26 02:25
Sorry, my problem is kinda hard to explain without going on a huge tangent. I have a node with a Position2D inside of it. I want the Position2D’s global position rotated relative to the parent node, so that it points towards the mouse position. I hope this helps
Afely | 2020-11-26 02:53