June 2013
Beginner
352 pages
9h 5m
English
You want the player to aim and click one of the cubes. You want to identify the selected cube, and make it rotate.
AnalogListener object on the Analog() method to test for our left-click action, MAPPING_ROTATE. Remember, we chose the AnalogListener object because rotation is a continuous motion.private AnalogListener analogListener = new AnalogListener() {
public void onAnalog(String name, float intensity, float tpf) {
if (name.equals(MAPPING_ROTATE)) {
// implement action here
}
}
};com.jme3.collision package. Replace the implement action here comment with the following code; first we create an empty results ...Read now
Unlock full access