public void update(Game game)
    {
        lastMovementType = Types.MOVEMENT.MOVE;

        //Get the input from the player.
        requestPlayerInput(game);

        //Map from the action mask to a Vector2D action.
        Direction action2D = Utils.processMovementActionKeys(getKeyHandler().getMask(), getPlayerID());

        //Update the orientation for this cycle's movement,
        // but only if the movement is perpendicular to the current orientation.
        if((action2D != Types.DNONE) && (Direction.orthogonal(action2D, this.orientation)))
        {
            this._updateOrientation(action2D);
        }

        //Update movement.
        super.updatePassive();

        //Spawn behind:
        if(!this.rect.intersects(this.lastrect))
            game.addSprite(spawnId, this.getLastPosition());
    }