parameters: (keys)
docstring: move camera target based on arrow keys
docstring_summary: move camera target based on arrow keys
docstring_tokens: move camera target based on arrow keys
function: def move_view(keys):
      '''move camera target based on arrow keys'''
      global last_move, move_accel
      now = time.time()
      if now - last_move < 0.1:
          return
      last_move = now
      KEY_LEFT = 65295
      KEY_RIGHT = 65296
      KEY_UP = 65297
      KEY_DOWN = 65298
      global move_accel
      angle = None
      if KEY_LEFT in keys:
          angle = 90
      elif KEY_RIGHT in keys:
          angle = -90
      elif KEY_UP in keys:
          angle = 180
      elif KEY_DOWN in keys:
          angle = 0
      else:
          move_accel = 0
          return
  
      caminfo = list(sim.sim.getDebugVisualizerCamera())
      target = caminfo[-1]
      dist = caminfo[-2]
      pitch = caminfo[-3]
      yaw = caminfo[-4]
      look = 90.0-yaw
      step = 0.3 + move_accel
      move_accel += 0.1
      move_accel = min(move_accel, 5)
      target = (target[0] + step*math.cos(radians(look+angle)),
                target[1] - step*math.sin(radians(look+angle)),
                target[2])
      sim.reset_debug_visualizer(dist, radians(yaw), radians(pitch), target)
function_tokens: def move_view ( keys ) : global last_move , move_accel now = time . time ( ) if now - last_move < 0.1 : return last_move = now KEY_LEFT = 65295 KEY_RIGHT = 65296 KEY_UP = 65297 KEY_DOWN = 65298 global move_accel angle = None if KEY_LEFT in keys : angle = 90 elif KEY_RIGHT in keys : angle = - 90 elif KEY_UP in keys : angle = 180 elif KEY_DOWN in keys : angle = 0 else : move_accel = 0 return caminfo = list ( sim . sim . getDebugVisualizerCamera ( ) ) target = caminfo [ - 1 ] dist = caminfo [ - 2 ] pitch = caminfo [ - 3 ] yaw = caminfo [ - 4 ] look = 90.0 - yaw step = 0.3 + move_accel move_accel += 0.1 move_accel = min ( move_accel , 5 ) target = ( target [ 0 ] + step * math . cos ( radians ( look + angle ) ) , target [ 1 ] - step * math . sin ( radians ( look + angle ) ) , target [ 2 ] ) sim . reset_debug_visualizer ( dist , radians ( yaw ) , radians ( pitch ) , target )