 
     # Initializing Position
     gPos = cam2d.getGlobalPos()
-    @routeView.position = new THREE.Vector3(-gPos[0], gPos[1], gPos[2]+1)
+    pos = [[-gPos[0], gPos[1], gPos[2]], [-gPos[2], gPos[1], -gPos[0]], [-gPos[0], gPos[2], -gPos[1]]]
+    for i in [0..2]
+      @routeView[i].position = new THREE.Vector3(pos[i][0], pos[i][1], pos[i][2]+1)
 
     particle = new THREE.Mesh(new THREE.CubeGeometry(300, 300, 300, 10, 10, 10), new THREE.MeshBasicMaterial({color: 0xff0000}))
     particle.position.x = 0

    # create route to show in previewBox and pre-allocate buffer
    @maxRouteLen = maxRouteLen
    routeGeometry = new THREE.Geometry()
    routeGeometryView = new THREE.Geometry()
    particles = new THREE.Geometry()
    i = 0
    while i < maxRouteLen
      # workaround to hide the unused vertices
      routeGeometry.vertices.push(new THREE.Vector2(0, 0))
      routeGeometryView.vertices.push(new THREE.Vector2(0, 0))
      particles.vertices.push(new THREE.Vector2(0, 0))
      i += 1

    routeGeometry.dynamic = true
    routeGeometryView.dynamic = true
    route = new THREE.Line(routeGeometry, new THREE.LineBasicMaterial({color: 0xff0000, linewidth: 1}))
    routeView = new THREE.Line(routeGeometryView, new THREE.LineBasicMaterial({color: 0xff0000, linewidth: 1}))
    particleSystem = new THREE.ParticleSystem(particles, new THREE.ParticleBasicMaterial({color: 0xff0000, size: 3, sizeAttenuation: false}))
    @route = route
    @routeView = routeView


    @addGeometry VIEW_3D, route
    @addGeometry VIEW_3D, particleSystem
    for i in [0..2]
      @addGeometry i, routeView[i]

  updateRoute : ->
    gPos                = cam2d.getGlobalPos()
    scale               = [cam2d.getPlaneScalingFactor(PLANE_XY), cam2d.getPlaneScalingFactor(PLANE_YZ), cam2d.getPlaneScalingFactor(PLANE_XZ)]
    
    pos = [[-gPos[0], gPos[1], gPos[2]], [-gPos[2], gPos[1], -gPos[0]], [-gPos[0], gPos[2], -gPos[1]]]
    for i in [0..2]
      @routeView[i].scale    = new THREE.Vector3(1/scale[i], 1/scale[i], 1/scale[i])
      @routeView[i].position = new THREE.Vector3(pos[i][0]/scale[i], pos[i][1]/scale[i], pos[i][2]/scale[i]+1)
      @routeView[i].geometry.verticesNeedUpdate = true
