title: How to fix 'invalid set index position on base kinematic body' error in Godot?
body: <p>In Godot i'm trying to get a kinematic body to teleport to the position of the mouse and i get this error: <code>Invalid set index 'position' (on base: 'KinematicBody') with value of type 'Vector3'.</code>I don't want to use move and slide as I want the item to be teleported to the mouse, not move towards the mouse</p>
  
  <p>My code:</p>
  
  <pre class="lang-py prettyprint-override"><code>extends KinematicBody
  
  # Declare member variables here. Examples:
  # var a = 2
  # var b = "text"
  
  # Called when the node enters the scene tree for the first time.
  func _ready():
      pass # Replace with function body.
  
  # Called every frame. 'delta' is the elapsed time since the previous frame.
  func _process(delta):
      if (Input.is_action_pressed("ui_right")):
          rotate_y(-0.1)
      elif (Input.is_action_pressed("ui_left")):
          rotate_y(0.1)
      elif (Input.is_action_pressed("ui_up")):
          rotate_z(0.1)
      elif (Input.is_action_pressed("ui_down")):
          rotate_z(-0.1)
      var tempPosition = place()
      print(tempPosition)
      if tempPosition != null:
          var temp_mesh  =get_tree().get_root().get_node("World/TestBody")
          temp_mesh.position = tempPosition
  
  
  func _input(event):
      if event is InputEventMouseMotion:
          rotate_y(-event.relative.x * 0.0002)
          $pivot.rotate_x(-event.relative.y * 0.0002)
          $pivot.rotation.x = clamp($pivot.rotation.x, -1.2, 1.2)
  
  # Place an item
  func place():
      var ray_length = 5000
      var mouse_pos = get_viewport().get_mouse_position()
      var camera = get_node("pivot/Camera")
      var from = camera.project_ray_origin(mouse_pos)
      var to = from + camera.project_ray_normal(mouse_pos) * ray_length
      var space_state = get_world().get_direct_space_state()
      var result = space_state.intersect_ray(from, to)
      if result:
          return result.position
  </code></pre>