Hi,

I am geting a strange result when I dynamically change the behavior assigned to
an object at run time. I have the following scene graph structure:

                                                Group
                 (with CHILDREN_READ,WRITE & EXTEND set)
                                                    /\
                                            BG        TG
           (with DETACH capability set)   (for translation)
                                        /                     \
                    PositionInterpolator            TG
                                                               (with
TRANSFORM_WRITE set)
                                                                \
                                                                Object (Box)

This creates a moving box which behaves as expected the problem arises when I
try to change the axis of translation of the box when it collides with another
object. I have tried to do this in two ways but both result in the same
problem. When the axis of translation is changed the object seems to 'jump' and
misses a section of the path it is supposed to travel along. It does not move
from the point it was at but at some point several vector coordinates from
where it was.

The actual translation coordinates of the box are reset to those of where the
collision occured so that the behavior starts from this new translation and not
its origin.

If the behvaior is looped for more than one time then on the second cycle of
the behavior the object travels the correct path with no 'jumping' - just a
smooth translation. For the purpose of the program it is important that the
changed behavior works on the first loop.

The ways I have tried to do this are:
1. Change the parameters of the existing interpolator at runtime.
2. Detach the BranchGroup which the Interpolator is attached to and then
declare a new one and attach it to the scene graph.

Both these methods result in the same output. I have thought that maybe the
alpha object maybe something to do with it - but I cannot pin point it for
sure. I am also not entirely sure that I am using the 'axisangle4f'  type
correctly - would this have possibly have any influence on the output described
here.

I would be extremely grateful for any suggestions/ideas of how to simply change
the axis of translation of an object at runtime as this is driving me insane!!

Many thanks

Chris

===========================================================================
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".

Reply via email to