Great thanks, so does this translation matrice only set the objects position, or can it be used to as a vector matrice?
Say we have this point:
(100,50)
How do I get the object to move from its origin to the point (100,50) with a speed of about 20 ms-1. If you could show me an example of how this would be done, that would be cool.
hey, i rember this tutorial from a while ago, but i had a problem when using it. For some reason during the “WalkDude” application, the purple guy always flies of the screen even if i just tap the forward key.
The transform tree of the scene graph describes the static position of everything at the scene at one point in time.
If you arent writing a game and can use “sloppy motion” where you cant count on wher it isin any given frame, you cna use Java 3D’s interpolators to interpolate a transform matrix between to values over time.
If youa re doing a game or some other kind pof program that requires rpecise control of motion then you need to write animation code that is called from a WakeupOnFrame(0) behavior to do the animation.
If you’ld like to see an example, you can grab my code for JNWN at jnwn.dev.java.net. Look at AnimationBehavior and how it works. I warn you its moderately complex because it handles a variety of animation manipulations, not just motions.
Sounds like your framerate is faster than the original code expected - this is quite likely given that I wrote it 2-3 years ago now. Try reducing the the size of the forward step by a factor of 100 or so. There was also a problem with some processors and the J3D high res timer, I seem to recall I have found a workaround for this.
The questions you are asking are largely answered in that tutorial- if you follow through the text you should be able to work out why it’s not working on your machine and fix it from the source code.