hey i need to get the x,y and z values of the coordinates separately so that i can modify them and get the new coordinates for position. can u tell me hoew to implement that in javascript.the code that i am currently using, displays the coordinates of a moving object.i need to separate them and modify them like x+4 or y-3 and then use them in transform.position.thanks in advance
my current code:-
//Unity will constantly check the position of the GameObject.function Update () {
//Creates a variable to check the objects position.
myPosition = transform.position;
//Prints the position to the Console.
Debug.Log(myPosition); }