Skip to main content

Moving objects

1 reply [Last post]
Anonymous

I have been looking around the tutorial and the examples and it could be me, but i cant find how to make a object move according to the key presses, so like:

....
// this is the TransformGroup for the object i need to move

// this only rotates it because i am not quite sure how to move it.
TransformGroup tg = MyView.getTG();

angle += .1;
Transform3D t3d = new Transform3D();

//this should be changed
t3d.rotZ(angle);
tg.setTransform(t3d);

....

anyone hav any thoughts or ideas that they would like to share because i am a little confused, i been looking at the API's and i dont see how

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alessandro Borges

Take a look at AWTInterection demo, in your Java3D demo folder.

Alessandro

--- java3d-interest@javadesktop.org escreveu:
> I have been looking around the tutorial and the examples and it could be me,
> but i cant find how to make a object move according to the key presses, so
> like:
>
> ....
> // this is the TransformGroup for the object i need to move
>
> // this only rotates it because i am not quite sure how to move it.
> TransformGroup tg = MyView.getTG();
>
> angle += .1;
> Transform3D t3d = new Transform3D();
>
> //this should be changed
> t3d.rotZ(angle);
> tg.setTransform(t3d);
>
> ....
>
> anyone hav any thoughts or ideas that they would like to share because i am a
> little confused, i been looking at the API's and i dont see how
> ---

_______________________________________________________
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net