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); }
private void lookRight() { view = OperationMatrixVector.xVxM(FactoryMatrix.getTrans(-position[0], -position[1], -position[2]), view); view = OperationMatrixVector.xVxM(FactoryMatrix.getRotY(-0.01 * lookSpeed), view); view = OperationMatrixVector.xVxM(FactoryMatrix.getTrans(position[0], position[1], position[2]), view); }