How to deserialize static physics nodes?

Hey, I’m trying to deserialize a static physics node, but I always receive the following exception:



“java.lang.IllegalAccessException: Class com.jme.util.export.binary.BinaryClassLoader can not access a member of class com.jmex.physics.StaticPhysicsNode with modifiers “protected””



The problem is clear, but is there any way to avoid this? Or another way to save and load static physics nodes? I’m using jme 2 and jmePhysics.



greetings

Hey, does really no one have an idea how to solve this problem? I also receive this message:



“Class com.jme.util.export.binary.BinaryClassLoader can not access a member of class com.jmex.physics.StaticPhysicsNode with modifiers “protected”

Some types need to have the BinaryImporter set up in a special way. Please doublecheck the setup.”



How can/should I set up the BinaryImporter in a “special way”? ^^



greetings

well seems like abug to me, try setting the fields to public and test what happens

The two constructors of StaticPhysicsNode are protected. After I set them to public I received this Exception without any further info: java.lang.InstantiationException.

Yeah the requirement is for all Savables to be publicly accessible and to have an empty, public constructor.

So does that mean it’s not possible to deserialize a StaticPhysicsNode object? Because since I heard generatePhysicsGeometry() is buggy i want to use the StaticPhysicsNode as the ground for the player by creating PhysicsBoxes.

Hm ? I had never rpoblesm using just a model for the Ground, are you siing jme2?

well still it should normally work.

I’m really helpless. GeneratePhysicsGeometry() does definitely have a strange behaviour, at least if you use triangle accurate geometries. And also it does need a static physics node which I can’t serialize, or better deserialize to load a level from one file. I just wanne have walls and a floor for my Jump’n’Run player, which I can load and save. The player is made of physics objects and yes, I’m using jme2. I just can’t figure a smart and not so computing intensive way to do that.

Maybe you make the jump to jme3? Physics loading and saving is fully supported and if you run into problems we can fix them. jME2 and especially jME2-Physics is not developed anymore and jME2-Physics has some severe bugs anyway that will probably never be fixed.



Cheers,

Normen