We will now program the functionality to move the cube using a vector. To the Transform class, add a new method called move:
def move(self, amount: pygame.math.Vector3):
self.position $=$ pygame $\cdot$ math.Vector3 (
self.position. $x+$ amount. $x$,
self.position.y + amount.y,
self.position. $z$ + amount. $z$ )
This method will accept a 3D vector as the parameter and then use each part of the vector to update the corresponding position coordinate.