I can't find anything about the problem I've been having running the jmephysics2 tutorials and interactive tests.
When I run with (as far as I can tell) all libraries and jars set up correctly, under linux, I get the error:
15-Apr-2006 19:20:35 org.odejava.Odejava <clinit>
SEVERE: Native code library failed to load: java.lang.UnsatisfiedLinkError: /path/lib/libodejava.so: /path/lib/libodejava.so: undefined symbol: _Z20dCollideSphereSphereP6dxGeomS0_iP12dContactGeomi
java.lang.UnsatisfiedLinkError: get_PARENTSPACEID_ZERO
at org.odejava.ode.OdeJNI.get_PARENTSPACEID_ZERO(Native Method)
at org.odejava.ode.Ode.getPARENTSPACEID_ZERO(Ode.java:73)
at org.odejava.Space.<clinit>(Space.java:76)
at com.jmex.physics.impl.ode.OdePhysicsSpace.<init>(OdePhysicsSpace.java:243)
at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.create(OdePhysicsSpace.java:119)
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:262)
at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:41)
at com.jme.app.BaseGame.start(BaseGame.java:61)
at net.java.dev.aircarrier.physicstest.Lesson1.main(Lesson1.java:69)
(I replaced the path with just "path", but it is correct. I'm not sure whether the line ending "Geomi" is being cut off or really ends like that).
I've tried getting ODE from CVS and adding to the library path, I don't know whether this is necessary, but I wasn't sure whether the odejava library contains ODE itself or just the JNI wrapper.
I get the same error using
- CVS source built by eclipse directly, with libs from CVS
- CVS source build with ANT in eclipse, with libs from CVS
- Tutorial code in eclipse, but using the jar and libs from beta2 zip (the stack trace is from this last attempt)
I also wanted to ask about collision detection - the main reason I want jmephysics is to get accurate collision of moving bounding boxes with static meshes and bounding boxes, for a plane dogfighting game. I don't particularly want the physics simulation, since I don't want realistic physics, but rather behaviour like planes bouncing away from obstacles isntead of tumbling into them, but jme collisions don't seem to give enough information on collisions for this. Ideally, I would like to use jmephysics just to enforce non-intersection of the planes with the "level" by sliding the plane bounding box along objects it collides with, and leave setting of heading and desired velocity (velocity in the case of no contact) to my code. Would this be possible?
[EDIT] Looks like I can do that… more or less, by setting friction to 0. I should check these things before I ask. That method works with jmephysics, so I assume it will still be ok in jmephysics2 if I ever get it working