I am making a 3d game

Godot Version

4

Question

How would you go about making a variable to figure out the player y and have it update constantly?

player_node_3d.global_position.y

1 Like

thank you but now it wont update the position

This code section is accessing the position of the player Node3D, which is a Vector3,
lastly we get the y component from the position. You might have to find a tutorial to learn about the basic knowledge of Godot.

1 Like

I also suggest, along with coderjo, that you go to the godot docs and look into the beginner examples / tutorials. It will easily tell you how to update a node, or in your case a Player, to move around how you want it to.

2 Likes

Setters and Getters?

thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.