You'll need a little math for that.

so first you'll get the difference of the 2d vectors of the objects (x and y for example)

then, you need to get the arc tangent of the value you got previously

it would look something like this:

```
var a = Vector2(200, 600)
var b = Vector2(300, 100)
func getangle():
var diff = Vector2(a.x - b.x,a.y - b.y) #or can just be a - b but can be bothered to check
return atan(diff.y,diff.x) #return angle in radians. use radtodeg() if you want the angle in degrees.
```

the vectors used will be the axis that isnt the axis of rotation. example:

getting y rotation using x and z vectors from both objects.

after that, set the bodies rotation.someaxis to getangle!

So in this case I need to get the global

transform.origin.x and globaltransform.origin.z of the nodes I want, is this it? With a being the target node position and b being the node position itself?I had to use atan2 cause atan only asked for 1 argument, but it doesn't rotate right still.

Code: