godotengine / godotengine/godot-docs

get_angle_to, should precise his point argument is in global_coordinates.

Open
#10,984 0 comments 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
4.4.1.stable

**Issue description:**
I was dabbling with a cone rotation to rotate it toward my player at consistently over a certain time. At first I was putting Player.position, which couldn't work obsiously, so when I did to_local(Player.global_position) I thought I fixed the issue on that part and the fact it didn't work was coming from something else.
It's just cuz I was lucky enought to see look_at that it was doing exactly what I needed that it precised global coordinates that I thought maybe get_angle_to needed globals position too ?
Yes it does and unless you're making the correlation you cannot guess it.

**URL to the documentation page (if already existing):**
[get_angle_to](https://docs.godotengine.org/en/stable/classes/class_node2d.html#class-node2d-method-get-angle-to)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.