Need object to face player

Godot Version

4.4

Question

Hello! I am having a small issue that I would like to resolve. I have an object that is coded to always face the player. It only follows the player on an X axis, but I want it to follow the player along all axes, if that makes sense. Below is the line of code I use to have it follow the player.

look_at(Vector3(player.global_position.x, global_position.y, player.global_position.z), Vector3.UP)
1 Like

im stupid nevermind solved

Hey! It’s usually a nice gesture to write out how you solved your issue, so that people who find this thread in the future will know how you solved it! Instead of just seeing “nvm solved it” as the solution :slight_smile:

2 Likes

Oh right! Sorry, I forgot. To solve it, I made sure I was calling for the players y position by putting “player.” in front of “global_position.y”

1 Like