Added realistic physics engine for Xith3d (ODE)

For OdeCar (which is a lot of fun) I found it much easier to use a chase view, so I added the following:


                } else if (camera == 4) {
                    // Chase Camera
                    viewCenter = odeCar.getObjectPosition(4);
                    viewLocation = odeCar.getObjectPosition(4);
                    viewLocation.x -= 0;
                    viewLocation.y -= 0f;
                    viewLocation.z += 3f;
                    
                    viewCenter.x += 0;
                    viewCenter.y += 1f;
                    viewCenter.z += 3f;

                    view.getTransform().lookAt(viewLocation, viewCenter,
                        new Vector3f(0, 0, 1));
                    
                    Matrix3f m = odeCar.getObjectRotation(4);
                    Matrix3f m2 = new Matrix3f();
                    m2.rotX((float) Math.PI / 2);
                    m.mul(m2);
                    view.getTransform().setRotation(m);

                    Vector3f chaseV = new Vector3f(0, 10f, 50f);
                    Transform3D chaseT3D = new Transform3D();
                    chaseT3D.set(chaseV);
                    view.getTransform().mul(chaseT3D);
                    
                    
                }

and


        case '4':
            camera = 4;

            break;

This adds the “traditional” chase view found in most driving games these days :smiley:

Is the jar still broken? I get the same error like before (UnsatisfiedLinkError: new_dWorld) and it works fine without the jar.

Suggestion: It’s probably better to either make the windows native library a seperate download or include the linux and mac library in the full download.

I am planning to spend some time with Odejava later in this week.

The package certainly needs some work as the current one is more an temporary solution. Will add linux and macos libraries to odejava-0.1.2 package aswell.

Other important thing is CVS that I need to set up to odejava.dev.java.net.

PS. Kevdog, good going! Tell me when you got new car simulation ready :slight_smile: I’ve build an human body (crash test dummy from 3dstudio) that can dropped in a boxstack, it’s pretty funny.

I’m totally new to ODE, though I had seen it before, but wasn’t interested since it wasn’t Java. Maybe I’ll have a snoop around as I really like messing with Physics :smiley:

I write Odejava related post one more time to this thread just to remind everyone that Odejava discussion is moved to Physics forum.

See the link below:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=physics;action=display;num=1070980274;start=0

I just wrote some guidelines and ideas on how to proceed with this Project.

Hopefully Xith3d and Java Physics guru’s join to Odejava’s physics thread and share their comments especially when the new Odejava version is out.

Hope you all have nice Christmas, Jani