RigidBodyControl Runtime Exception Error!

I can`t handle this error.

[java]

AmbientLight light = new AmbientLight();

light.setColor(ColorRGBA.LightGray);

rootNode.addLight(light);

Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");

material.setTexture("ColorMap", assetManager.loadTexture("Textures/Terrain/Pond/Pond.jpg"));



Box floorBox = new Box(140, 0.25f, 140);

Geometry floorGeometry = new Geometry("Floor", floorBox);

floorGeometry.setMaterial(material);

floorGeometry.setLocalTranslation(0, -5f, 0);

floorGeometry.addControl(new RigidBodyControl(0)); // This point is runtime Exception Error occured!

rootNode.attachChild(floorGeometry);

bulletAppState.getPhysicsSpace().add(floorGeometry);

[/java]



Error Message follow as.

initUserPointer:java.lang.UnsatisfiedLinkError

exception thrown in Thread{GLThread} at com.jme3.bullet.collision.PhysicsCollisionObject.initUserPointer(Native)

you have no collision shape

try

[java]floorGeometry.addControl(new RigidBodyControl(floorGeometry, 0));[/java]

this sould work

Is this native bullet? The error you posted gets interesting in the next line you didn’t post. Anyway native bullet isn’t stable yet, especially the newly added collision stuff.

Error Message follow as.

initUserPointer:java.lang.UnsatisfiedLinkError

exception thrown in Thread{GLThread} at com.jme3.bullet.collision.PhysicsCollisionObject.initUserPointer(Native)

at com.jme3.bullet.collision.PhysicsCollisionObject.initUserPointer(-1)

at com.jme3.bullet.objects.PhysicsRigidBody.postRebuild(-1)

at com.jme3.bullet.objects.PhysicsRigidBody.rebuildRigidBody(-1)

at com.jme3.bullet.control.RigidBodyControl.setSpatial(-1)

at com.jme3.scene.Spatial.addControl(573)

at com.myandroid.mytest01.Game12.makeBric(89)

at com.myandroid.mytest01.Game12.initWall(148)

at com.myandroid.mytest01.Game12.simpleInitApp(68)

at com.jme3.app.Simpleapplication.initialize(230)

at com.jme3.system.android.OGLESContext.initInThread(266)

at com.jme3.system.android.OGLESContext.onSurfaceCreated(217)

at android.opengl.GLSurfaceView$GLThread.guardedRun(1373)

at android.opengl.GLSurfaceView$GLThread.run(1138)



I type all error item.

Oh my god… i have same runtime error in ‘Tutorials for Beginners Chapter13. Hello Physics’…



@niccommander

CollisionShape don`t have Geometry…

Just use jbullet. How you set up your project? How you compile? Maybe you just forgot to add the right jar libraries, the project structure has changed lately and if you use the nightly zip you have to add all needed jME3-xxx.jar files to the class path.

@normen

Thank you for your advise.

I use Eclipse, and real Devise(that Galaxy Tab 7 Gingerbread).

I add JME3-bullet.jar, JMonkeyEngine3-android.jar.

Then you need at least jME3-core, jME3-android, jME3-bullet, and the jME3-bullet-android-natives.jar (rather the contents) for android. The SDK sets up an android project from a normal project automatically doing all that for you, you can open that project in Eclipse as well.

Generally coding Java for jME3 apps shouldn’t be much different in the SDK than in Eclipse though given that the specialized Eclipse tools don’t help you much with jME3 projects (you can set up the keyboard shortcuts to be like in Eclipse). Also you might want to convert models to j3o format before using them on android as there might be issues with importing models on that platform (performance as well as compatibility). All in all theres lots of little things the SDK can aid you with.

@normen

I give up to use JME3 on Eclipse. Though I add All lib that you mentioned to me,

I think carefully, JME3 dont support Eclipse environment perpectly...<br /> OK, Ill use JME3 SDK that you recommended to me.

Actually when i started to use jme3, i used JME SDK, but SDK dont run android app directly on my phone(Galaxy tab 7 supporting Open gl es 2.0)<br /> Of course, I read this forum http://hub.jmonkeyengine.org/groups/android/forum/topic/android-deployment-via-checkbox-is-here/<br /> But i ran the project along selecting the “Android Device” build configuration next to the run button but it didnt work.

But when i click Services tab → Android devices → mydevice → ‘Take device snapshot’. it work.

I want to concentrate to develope my source coding, not to bulid develop environment. i spent 4 days to selecing either SDK or Eclipse and

building develop environment. Help me please…

jME3 works fine in eclipse with android, just set it up like any android library…

Anyway, in the SDK, to make the android application run on the phone, go to the project settings and disable “Save on Compile” under “Run”, also select the “Android Device” configuration next to the “play” button in the button bar. Make sure you select the jME3 project as your main project. Then pressing the play button should install the application on your (connected) device.

@normen

you say “Make sure you select the jME3 project as your main project.”

That means class which extends SimpleApplication should have int main method?

or i should make 'New project ’ → JME project.

When i make ‘New proejct → Android → Android project’ then the “Android Device” build configuration next to the run button is disappear.

Yeah, you make a normal jME3 project. They can be deployed to desktop, android, applet and webstart. Read the manual and whats written in the android deployment settings panel of the project.

@normen

Thank you for your kindness.