Thanks John, The reason Im working with two TransformGroups is the fact that if the shuttle is moving in a certain direction just turning the shuttle will not change that movement. Only after applying a new thrust with the new direction will cause the new movement to be applied to the old movement. The old movement will never end unless a 100% opposite thrust is applied.
----- Original Message ----- From: "John Wright" <[EMAIL PROTECTED]> To: <JAVA3D-INTEREST@JAVA.SUN.COM> Sent: Saturday, June 18, 2005 4:09 PM Subject: Re: [JAVA3D] Space Shuttle Physics? > Jaakko, > > Welcome to the list (you'll probably soon get the standard "this list > isn't supported any more go participate on another list" messages). > > Why use two separate TransformGroups? I move my avatars with a single > TransformGroup. > > All you need are the basic geometry formulas for working with angles and > distances (triangles) and you can calculate the correct new position > based on your angle and speed. (Grab any high school geometry book if > you aren't familar with them off the top of your head) > > - John Wright > Starfire Research > > Jaakko Holopainen wrote: > > Hi, hello everyone this is my intro to the list as well. > > > > Im doing a space shuttle simulation and need some help with one thing, > > > > I have a set up a shulttle in a structure like this: > > > > TransformGroup1 > > -> TransformGroup2 > > -> Shuttle > > > > The idea is that the movement of the shuttle is performed in the > > TransformGroup1, > > and the rotation of the shuttle in TransformGroup2. > > > > I also have a few Vectrors to hold the data i need. > > > > Vector3f speedVector (basically just the z set to some value). > > Vector3f thrustVector (the z value increasing while a buton is pressed and > > 0.0f if not). > > > > I then have a main loop calling enach 1/100 of a second an update shuttle > > method, which does the following: > > > > 1. get the current transformation from TransformGroup1. > > 2. get the current rotation from TransformGroup2. > > > > 3. apply the thrust to the speed. > > 4. apply the speed to the TransformGroup1. > > > > This far i have made it and the shuttle can now be sent in one (hard coded) > > direction and rotated (with MouseRotate). > > > > What i would like to know is how could i make the thrust applied in > > combination with the rotation in > > TransformGroup2 so that the direction of movement could be changed. > > > > Can someone describe what are the 16 float's that can be get from a > > Transform3D object. > > > > > > BR, > > Jaakko Holopainen > > > > =========================================================================== > > 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". > > > > =========================================================================== > 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". =========================================================================== 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".