Esempio n. 1
0
        public void moveForward(List <Collision> colitions)
        {
            double[] vector = new double[4];

            vector = OperationMatrixVector.distance(view, position);
            vector = OperationMatrixVector.normalize(vector);
            vector = OperationMatrixVector.xVxS(vector, moveSpeed);
            move(vector, colitions);
        }
Esempio n. 2
0
        public void moveRight(List <Collision> colitions)
        {
            double[] vector = new double[4];

            vector = OperationMatrixVector.distance(view, position);
            vector = OperationMatrixVector.normalize(vector);
            vector = OperationMatrixVector.xVxM(FactoryMatrix.getRotY(-Constant.ANGLE90), vector);
            vector = OperationMatrixVector.xVxS(vector, moveSpeed);
            move(vector, colitions);
        }