0 votes

I'm trying to get my node to look at a certain position with look_at(), it works fine when the target is under the node and on the left side, but in any area other than that would make it point to the wrong direction.
It's not randomly turning, it turns an extra 90 degrees whenever the target moves beyond that position.
Is it a bug or am I just misusing look_at? All I'm doing is look_at(target.global_position).

in Engine by (21 points)

Is the node facing to the right when it's at 0 degrees rotation?

1 Answer

0 votes
Best answer

I literally had a piece of code that would make it rotate 90 degrees when the sprite is rotated 115 degrees or more... sorry please don't kill me.

by (21 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.