generatePhysicsGeometry in jme2

i started a project a long time ago and have been using jme1. a few hours ago, i downloaded and made the necessary changes in my code for jme2. the only thing that i haven't figured out is an error that happens at this line:


dynamicNode.generatePhysicsGeometry(true);



where dynamicNode is a dynamic node (d'uh ), specifically a TriMesh box
doesn't work with static nodes either.
i get the same error on everything, including terrain pages etc.
everything worked ok on jme1.

this is the exception i get:

Exception in thread "Thread-5" java.lang.NoSuchMethodError: com.jme.scene.Geometry.getBatch(I)Lcom/jme/scene/batch/GeomBatch;
        at com.jmex.physics.PhysicsNode.generatePhysicsGeometry(PhysicsNode.java:239)
        at com.jmex.physics.PhysicsNode.addPhysicsGeometries(PhysicsNode.java:197)
        at com.jmex.physics.PhysicsNode.generatePhysicsGeometry(PhysicsNode.java:167)
        at com.jmex.physics.PhysicsNode.generatePhysicsGeometry(PhysicsNode.java:142)
        at com.jmex.physics.PhysicsNode.generatePhysicsGeometry(PhysicsNode.java:127)



what's the catch?  :D
(btw, i'm using jme-physics 2.1)

i think getBatch() is a jme1 method which has been removed in jme2.

Make sure you don't have old jme1 libraries around.

i'm sure i don't have the old jme1…

it looks like the error is from inside jme-physics  :expressionless:



java.lang.NoSuchMethodError: com.jme.scene.Geometry.getBatch(I)Lcom/jme/scene/batch/GeomBatch;

        at com.jmex.physics.PhysicsNode.generatePhysicsGeometry(PhysicsNode.java:239)

Did you get the phyics from: http://code.google.com/p/jmephysics/ ?



That looks like you are somehow using the jME1.0 physics with jME 2.0 …

i'm using jme-physics 2.1  :expressionless:

and as far as i understood,

This release works with the jME 1.0 release

from: http://www.jmonkeyengine.com/jmeforum/index.php?topic=6459

ok, let me try downloading it again..
this is where i get my jar files: https://jmephysics.dev.java.net/servlets/ProjectDocumentList?folderID=8419

I had this problem too. Did you check out the physics from googlecode or did you download the jars? Only the SVN code is for jME2. By the way, since jME2.0 is pretty much considered final now shouldn't jME-physics jars be included for jME2 as well?

blue_veek: jmephysics.dev.java.net and jme.dev.java.net provide the old jme1 version.



This is the location for the recent jme2 versions:

http://code.google.com/p/jmonkeyengine/

http://code.google.com/p/jmephysics/

I had this problem too. Did you check out the physics from googlecode or did you download the jars? Only the SVN code is for jME2. By the way, since jME2.0 is pretty much considered final now shouldn't jME-physics jars be included for jME2 as well?

Do you mean on the googlecode physics download page or the actual jME download page?  (please clarify Momoko_Fan :))

edit: If its on the physics googlecode page, I think either irrisor or possibly nymon would have to do that...
Momoko_Fan said:

Did you check out the physics from googlecode or did you download the jars? Only the SVN code is for jME2.


yup, the problem was that i was using the jars, not the SVN code..

Momoko_Fan said:

By the way, since jME2.0 is pretty much considered final now shouldn't jME-physics jars be included for jME2 as well?


that would be so~ yay'ish  :D

A Jar distribution would be very nice :slight_smile:

hi guys …



I have the same problem … and I can't figure it out … I downloaded and tried with the latest JME and Physics built jars … no luck …



I checked out lastest JME 2 from SVN on googlecode and rebuilt jars … created JME library since I'm working in eclipse but still get the same exception …



do I have to take out Physics from SVN too ? … any help would be appreciated …



Kind regards



Armando

PS: a total game creational newby here !!! (please consider that)

yes both from svn, currently jmephysics for jme2 is not available through jars.

oh … ok … 10x …



Kind regards



Armando