I am currently makeing something for fun. I have a 3ds max model of a jeep which I load into my program with kevs loadereverything goes fine but i want to move it. I also want to make the wheels spin when the jeep is riding en make them turnwhen i make a turn. To do so i have made severl tranformgroups to be able to animate each part seperatlybut the things wont move and when I rotate a wheel its rotating not around the center of itself but around an axishow can i fix this. This is the code of the jeep class, which includes methods to drive and spin weels:

i first used the ase loader but my 3ds files get soooo large and it doenst support the 3ds materialsthats why i used an external 3ds loader for xith (kevs) to be able to do all thisaint their a way i can move the (0,0,0) around so point (1,2,5) for example becomes the new center?

In my experiance what makes it hard is that the actual geometry coordinates are at say 10,10,10 which makes it hard to transform it based on the object's own pivot point (instead of the object turning by itself, it is transformed relitive to the origin which is not what you want), hence the reason for my work on the ASE loader.

I'm not sure if I am misreading your problem though, it just sounded similar to one I had (and solved).

i have been able to track the coordinates of the center of each wheelcant i rotate a wheel around a custom axis? (formed with that coordinate)

Quote

is it possible to get the names of the nodes bcz when i useTDSmodel.getNamedTransformGroup(name);I have to allready know the name so i cant make a gerenal class which lodes each node seperatly

How did you do the tracking I wonder, without getting the names of the nodes?

i have now made a generic class which loads any model by loading its groups seperatlyi have made a little loader in which u can select which groups u want to seebut i have an other question, i have upgraded to java 1.5 and something in my menu doenst work anymorei have added some jcheckbox in a option JMenu but i cant click themthey appear when i click the jmenu so it unfolds but when i click the jcheckbox nothing happens bcz the program doesnt call the actionlistenerthis was going fine with java 1.4.2, the shadow jcheckbox is autoselected but both cant be clicked and I need to be albe those jcheckboxesbcz I have added another menu with all names of nodes/parts so i can select which ones i want to view

wrote a test class with just a jframei have adde 2 jcheckboxes (1 selected) to a jmenubar but stille the same problemi also adde a jpanel with a jcheckbox on and i can click that one no problem :sanyone has an idea?

Admittedly, this is a crappy fix, but it works! I added a mouse listener to the check box to listen for it being clicked. I also added a window listener so that the application doesn't keep running when the user tried to exit by clicking the "X".

i have drawn my probleem with my wheeli want to be able to rotate around the yellow axis and around the black axis (doesnt need to be at the same time)both axis go trhough the center point of the model (which i have been able to track)

I guess i would have to be able to translate the current x-axis to that location so i am able to spin it around that new axis?or am i seeing thins wrong

i have been able to spin my wheels and rotate them but not at teh same time i exectue follwing code: Transform3D t3d = components[0].getTransform(); t3d.setTranslation(new Vector3f(direction)); t3d.setRotation(new AxisAngle4f(1.0f,0.0f,0.0f, rotX)); //spin the wheel t3d.setRotation(new AxisAngle4f(0.0f,1.0f,0.0f, rotY)); ///turn the wheel components[0].setTransform(t3d);

if i do this only the second setRotation has effect, if i comment that one he does perform the first setRotationbu he doenst perform them both after each othter.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org