views:

60

answers:

1

Hey SO

When running my

  @Override
public void updateScene(int x, int y) 

The code the runs takes a little to long, and a user can click on a java3D object before the code has finished running and my RotationInterpolator can't keep up I cant change the Alpha on the RotationInterpolator as this is what the button updates so im looking for a way to disable the ability to Pick, I have tried

       Thread.currentThread().sleep(s * 1000);

but this makes the whole thread sleep , and thus the animation stops, and can't find any likely looking methods in the PickMouseBehavior Java Doc

the only solution I now see is to disable the users ability to Pick over the length of the coded something like

@Override
public void updateScene(int x, int y) {
disablePick();
// my code
enablePick();
}

Many Thanks ^_^

A: 

The solution was to pull the Alpha from the effected RotationInterpolator, and before allowing my code to run using an If statement such that

      Alpha al = head.getAlpha();

  if (al.finished())
  {
//code 
  }
Gwilym