Hi all,
I have updated the Magellan Spacemouse java class to read buttons. However,
when I set the the Sensor reading, I cannot call upon the buttons array from
the behaviour.
In the Deivce class I have something like:
case BUTTON1:
button_down[0] = BUTTON1;
//System.out.println(BUTTON1); // Prints out the assigned value, it is not
0!
sens.setNextSensorRead(System.currentTimeMillis(), new
Transform3D(rotation,translation,1),buttons);
In the behavior class I have:
sensRead.get(currXform);
sensRead.getButtons(buttons);
where currXform is a transform, and buttons is an int[]. The currXform works
fine, however, when I do a button count or print out the first buttons[0], I
always get 0, though I know this not be the case.
I have tried using
sens.lastButtons(buttons);
but does the same.
I have found no examples that pass in buttons, even from
http://www.cyber.koganei.tokyo.jp/vr/ site!
Can someone, help. I was happy with myself at working out decoding the
button packets, I thought the rest would be simple but it's not happening!
Thanks for your support.
Sky Rumsey
Undergrad, worker, slave.
University of Sussex
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".