Hi again,
I am having difficulty in changing the behavior of an object at run time.
Specifically, I have a box which, when it hits another object, changes its 'axis of
translation'. The problem is that when the axis of translation is changed the
object does not continue from its current position but starts from a vector
coordinate at some point along the new path. The object is animated by a
positionInterpolator.
I have tried to do this in two ways but both result in the same problem. These are:
1) When the box collides with another object the parameters (ie. the axis of
translation) of the poisitionInterpolator already referencing the box are altered.
2) When the box collides with another object I have detached the exisiting behavior
from the scene graph declared a new positionInterpolator and then re-attched it to
the scene graph.
Both of the problem jsut described.
In trying to find out why it was doing this I noticed that by changing the duration
of the alpha it varied the position of where the box starts its movement along the
new axis - extending the time makes the start position further away from the end
position and decreasing the time makes it start closer to the end position.
To get the correct start position I have had to adjust the start position of the
box when the axisoftarnslation is changed to counter balance this jumping - (this
is far from ideal as it involves readjusting all the parameters if I want to change
to duration of the alpha at run time).
Does anyone have any ideas what is wrong? All I want to do is change the direction
of an object when it collides with another one - what have I done wrong to make a
simple change so complicated!!.
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".