generatePhysicsGeometry(); with Cylinder not working

DynamicPhysicsNode roda = getPhysicsSpace().createDynamicNode();

            Cylinder roda2 = new Cylinder("roda", 10, 10, 1, 1, true);

            roda.attachChild(roda2);

            roda.setLocalScale(0.3f);

            roda.generatePhysicsGeometry();



It is not calculating the geometryPhysics :frowning: anyone know why?

ps: roda.generatePhysicsGeometry(true); not working too ;(

you can take a look the physics fun, there many different shapes are generated.

http://code.google.com/p/jme-demos/source/browse/trunk/physics_fun/src/com/jmedemos/physics_fun/util/ObjectFactory.java



i noticed you didn't set a BoundingVolume for your cylinder.



Add a

roda.setModelBound(new BoundingBox());
roda.updateModelBound();

then generatePhysicsGeometry(true) with and see if that works for you.

Thank you! It worked :smiley: