예제 #1
0
파일: camera.py 프로젝트: kovrov/scrap
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)
예제 #2
0
파일: camera.py 프로젝트: kovrov/scrap
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!