   setActiveNode : (nodeId, centered, mergeTree) ->
 
     @model.route.setActiveNode(nodeId, mergeTree)
-    @cam.setPos @model.route.getActiveNodePos()  +    @cam.setPos @model.route.getActiveNodePos()  
+
+
+  moved : =>
+
+    matrix = @cam.getMatrix()
+
+    unless @lastNodeMatrix?
+      @lastNodeMatrix = matrix
+      @setWaypoint()
+
+    lastNodeMatrix = @lastNodeMatrix
+
+    vector = [
+      lastNodeMatrix[12] - matrix[12]
+      lastNodeMatrix[13] - matrix[13]
+      lastNodeMatrix[14] - matrix[14]
+    ]
+    vectorLength = V3.length(vector)
+
+    if vectorLength > 10
+      @setWaypoint()
+      @lastNodeMatrix = matrix    
      "s" : => @cam.move [0, @model.user.moveValue, 0]
      "a" : => @cam.move [-@model.user.moveValue, 0, 0]
      "d" : => @cam.move [@model.user.moveValue, 0, 0]
      "space" : =>  @cam.move [0, 0, @model.user.moveValue]
      "shift + space" : => @cam.move [0, 0, -@model.user.moveValue]
      
      #Rotate in distance

  render : (forceUpdate, event) ->

    matrix = @cam.getMatrix()
    @model.binary.arbitraryPing(matrix)

    @model.route.rendered()

