Commits

German Larrain committed 76eafd6

demos.sensors.laser: set RAY_ROTATION, changed RAY_POS.

  • Participants
  • Parent commits 43e097d

Comments (0)

Files changed (1)

File demos/sensors/laser.py

 	"""
 
 	RAY_LENGTH = 1000.0
-	RAY_POS = (0, 2, 0)
+	RAY_POS = (0, 2, 1)
 
 	BACKGROUND_COLOR = (0, 0, 0)
 
 	# no rotation is the same as (any_axis, 0)
-	RAY_ROTATION = calc_rotation_matrix((1, 0, 0), 0)
-	#RAY_ROTATION = calc_rotation_matrix((1, 0, 0), pi / 4)
-	#RAY_ROTATION = calc_rotation_matrix((1, 0, 0), 7 * pi / 16)
+	# RAY_ROTATION = calc_rotation_matrix((1, 0, 0), 0)
+	RAY_ROTATION = calc_rotation_matrix((0, 1, 0), pi / 2)
 
 	def __init__(self):
 		FallingBalls.__init__(self)
 		space = self.sim.collision_space
 		self.sensor = sensors.Laser(space, self.RAY_LENGTH)
 		self.sensor.set_position(self.RAY_POS)
-		#self.sensor.set_rotation(self.RAY_ROTATION)
+		self.sensor.set_rotation(self.RAY_ROTATION)
 
 	def on_post_step(self):
 		try: