I am currently trying to adapt a program from Java 3D fast by Ian Palmer. The original program has a duck moving across the screen from left to right. The aim of the game is to shoot the duck. When the duck is shot it changes to a dead duck by using a switch. What I would like to do is to make the duck appear to fall from the air when shot. This seems simple to do as you could just simply change the axis of translation. However doing this 'on collision' ie when the duck is hit is proving to be more difficult.
The code for the interpolator that makes the duck from one end of the screen to another is as follows: PositionInterpolator moveDuck1 = new PositionInterpolator(duckAlpha1,duckMovXfmGrp1,axis1,-30.0f,30.0f); Where axis1 is the aixs of translation, duckMovXfmGrp1 is the transform group for the duck and -30,30 are the start and end points respectively. To register the collision and act upon it there is a separate class. Basically all I want to do is change the value of axis1 when a collision is registered. However trying to change the value of the position interpolator's axis value simply results in a null pointer exception. Could anyone tell me how to change the value of a postion interpolator from another class. Also would I need a new transform group to hold the extra movement of the duck(ie falling from the sky). Any contributions would be very welcome. Rob Elsam __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com =========================================================================== 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".