OK so here is my theory if i get the objects current position say, ( 5.2, 0, 2.3) and store it in a variable i can the pull that variable up later and edit it when i press one of the arrow keys, say like this ( 6.2, 0, 2.3) which will in theory move on the x axis thus moving it forward. Ive gotten to the point were i have edited the variable and printed both the current position and the position i want to move to when i press the up key , but the problem is how do i move this object from ( 5.2, 0, 2.3) to ( 6.2, 0, 2.3) when it’s edited position is stored in a variable? as you could tell i need it to be a variable because this position is constantly changing … any help would be greatly appreciated
// save the position handyPosition = transform.position // chane the position if you happen to want to handyPosition.y += 69; // move the object immediately to some position transform.position = handyPosition // more tricks ... make a "delta" delta = Vector3( 6,9,-1 ); // move the object immediately y that delta transform.position -= delta;
is that what you need to know? hope it helps
game engines make game development amazingly simple!