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); }
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); }