def move(amount, angle): global position, look_at # translation vector is final direction of movement translation_vect = rotateVectorY(direction, math.radians(-angle)) position = (position[0] + translation_vect[0] * amount, position[1] + translation_vect[1] * amount, position[2] + translation_vect[2] * amount) look_at = addVectors(position, direction)
def rotate_horizontal(degrees): # left/right global direction, look_at, yaw direction = rotateVectorY(direction, math.radians(-degrees)) look_at = addVectors(position, direction) yaw += degrees # temp hack!