 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
folding Guest
|
Posted: Sat Apr 22, 2006 4:12 am Post subject: How to stop a moving TransformGroup? |
|
|
Dear all,
my problem is that I am using a keyboard to navigate a transformgroup
object
the class implements KeyEventDispatcher
Below is the example of the coding
if(ycounter>3.7 && ycounter<4.83)
{
x = -(Math.cos(xcounter)*Math.cos(ycounter));
y = -(Math.sin(xcounter));
z = -(Math.sin(xcounter)*Math.sin(ycounter));
n = new Vector3d(v.x+x,v.y+y,v.z+z);
if((v.x+x<15)||(v.x+x>-15)||(v.z+z>-15)||(v.z+z>-15))
{
T3.setTranslation(n);
T3.setScale(0.9); // Add this line here to do the real
SCALE
transformGroupView.setTransform(T3);
}
how do I stop the movement, for example if the z coordinate reaches
10?
Thanks a lot |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|