Pseudocode example for updating x y z coordinates
For example, Now you can quickly and easily find your coordinates in Minecraft Java Edition (PC/Mac), Pocket Edition, Windows 10 and Education Edition with the /tp command. The easiest way to run a command in Minecraft is within the chat window.
The game control to open the chat window depends on the version of Minecraft: key to run the command.
I have a mouse function which will capture the mouse coordinates but am having trouble with the calculation part.
I have a function which increments my x and y angles and then calculates the new x,y,z coordinate for the camera: I have this set up to use keyboard events..
the X button adds to the camanglex variable, the Y button adds to the camangley variable, and the Z button adds to the distance variable.
This will bring up the debug screen where you can see your current XYZ coordinates in the game.
In the picture above, we've circled where the coordinates will appear in the debug window.