     jumpToPosition: (position) ->
         @xPosition = position.x
         @yPosition = position.y - @hitBoxHeight
+        @xOffset = position.x
+        @yOffset = position.y - @hitBoxHeight
 
     addToStage: (stage) ->
         @hitBox = new PIXI.Graphics()
         @hitBox.beginFill 0xFF0000
-        @hitBox.drawRect @xPosition, @yPosition, @hitBoxWidth, @hitBoxHeight
-
+        @hitBox.drawRect @xOffset, @yOffset, @hitBoxWidth, @hitBoxHeight
+        window.box = @hitBox
         stage.addChild @hitBox
 
     update: (elapsedTime, inputState) ->

            @xVelocity = @xAccelerationCap

    updatePosition: (timeRatio) ->
        @hitBox.position.x += @xVelocity * timeRatio
        @hitBox.position.y -= @yVelocity * timeRatio

    checkFloorCollision: (timeRatio) ->
        y = @hitBox.position.y
        yStep = y - @yVelocity * timeRatio
        console.log y, yStep

        if y < 0 and yStep >= 0
            @jumping = false
            @yVelocity = 0
            @hitBox.position.y = 0

    # These represent the upper left corner of the hit box
    xPosition: 0
    yPosition: 0

    # The offset of the box's origin point from the stage's origin point
    xOffset: 0
    yOffset: 0

    xVelocity: 0
    yVelocity: 0
