@Override
    public void onAction(String name, boolean ongoing, float ignored) {
        if (!ongoing) {
            return;
        }
        /*
         * Update the Y-axis rotation angle based on which key was pressed.
         */
        if (name.equals("left")) {
            angle += 0.1f; // radians
            System.out.print("rotate floor and sky leftward ...");
        } else if (name.equals("right")) {
            angle -= 0.1f; // radians
            System.out.printf("rotate floor and sky spatials rightward ...");
        } else {
            return;
        }
        /*
         * Update the local rotations of both objects based on the angle.
         */
        System.out.printf(" to %.1f radians left of start%n", angle);
        Quaternion rotation = new Quaternion();
        rotation.fromAngleNormalAxis(angle, Vector3f.UNIT_Y);
        floor.setLocalRotation(rotation);
        sky.setLocalRotation(rotation);
    }
Handle an input action from the user.

@param name the name of the action
@param ongoing true&rarr;depress key, false&rarr;release key
@param ignored ignored
jme3-examples/src/main/java/jme3test/texture/TestSkyRotation.java