Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  ASE Loader & pivot points  (Read 1469 times)
0 Members and 1 Guest are viewing this topic.
Offline rmdire

Junior Devvie

« Posted 2005-12-01 12:19:11 »


I am having trouble with  rotating around pivot points
I have loaded my model into the scene without problems

like so:

      AseFile af = new AseFile();
      BufferedReader br = null;
      try {
         // Attempts to read the file normally
         br = new BufferedReader(new FileReader(path));
      } catch (IOException e) {
         // Attemts to read file from JAR
         URL url = this.getClass().getClassLoader().getResource(path);
         try {
            br = new BufferedReader(new InputStreamReader(url.openStream()));
         } catch (IOException e1) {
            // TODO Auto-generated catch block
      AseReader r = new AseReader(br, af);
      namedNodes = new HashMap ();
      TransformGroup rootTG = af.getTransformGroupTree(namedNodes);
      Transform3D transform = new Transform3D();
      Transform3D myRot = new Transform3D();

                        Material mat2 = new Material();
      // Recursivly applies material to root BG
      addMaterial(rootTG, mat2);

and I can access each part using :

      TransformGroup backLeftLeg = (TransformGroup) namedNodes.get("Rear Left Leg");
      Transform3D trans = backLeftLeg.getTransform();

But when I try to rotate using:


the backLeftLeg rotates around a point somewhere below the foot (possibly 0,0,0)

The model is set at 0,0,0
and I have set my pivot points using 3Ds max 7 and saved the file using the helper options etc. as described in the tutorial

I also opened the ASE file to check that all the pivot points had been set - and they appear to be set at the right points

any ideas why this strange rotation is happening?


Offline rmdire

Junior Devvie

« Reply #1 - Posted 2005-12-02 09:35:53 »

Still no Joy,

Just wondered does anybody have an example .ASE model that I can look at and see if I can spot the difference


Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #2 - Posted 2005-12-03 08:41:37 »

have you looked at the example that came with the tutorial?

Try loading up the "human-orig.max" file from the tutorial, exporting and see if it works.  If it does then the problem lies elsewhere (i.e. your model or your code), if it doesn't then your exporting isn't working properly.

I have not yet tried with MAX 7, perhaps that is the issue (can you try with MAX6?)

If looking at the ASE file, TM_POS is the Pivot node (IIRC).



Pages: [1]
  ignore  |  Print  

EgonOlsen (78 views)
2018-06-10 19:43:48

EgonOlsen (58 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (260 views)
2018-05-13 18:23:11

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!