hi,
In my java3d application i have created a PositionInterpolar that makes a Box move from left to right on the screen at a constant speed. I have also added an KeyListener which increases and decreases the speed of movement by using the up and down arrow keys. I have tested the keylistener and it is working correctly. My problem is that i do not know how to modify the Alpha at runtime to change the speed of movement.
My aplha code -
Alpha transAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE|Alpha.DECREASING_ENABLE, 0, 0, speed, 0, 0, speed, 0, 0);
Keylistener code -
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_UP) {
speed = speed - 1000;}
The speed value decreases correctly but the Alpha doesnt change speed! Please can anyone help me?