Hi this might be a very beginner level question but I’m stuck at it.Here’s my question:
in Jmonkey’s beginner tutorial e.Hello Input it showed how to control the character(a box) using custom key
binding.And the codes look like these:
private AnalogListener analogListener = new AnalogListener() {
public void onAnalog(String name, float value, float tpf) {
if (isRunning) {
if (name.equals(“Rotate”)) {
player.rotate(0, valuespeed, 0);
}
if (name.equals(“Right”)) {
Vector3f v = player.getLocalTranslation();
player.setLocalTranslation(v.x + valuespeed, v.y, v.z);
}
I wonder how can I choose between different objects I have in scene using input key?
i.e hit 1 to choose node1 and control it.
hit 2 to choose node 2 etc etc.
Thanks for reading these and I really appreciate some help!