I ran the exact example code for HelloCollision.java and while the gravity works, it is inverted and causes the player to fall upward into the sky. Does anyone else have this issue when they run this code?
I typed HelloCollision into the search box and found:
…that might be related.
The second thread you mentioned states a similar issue to mine and they also state that they are using the Linux version. I’m running the code on Linux. I’m going to try running it on a Mac and see what happens.
You should try with a snapshot from the master branch, you can use jitpack for that, since there is a patch for what i believe may be your issue
I will try downloading the snapshot. I just tested on OS X v3.2.2-stable-sdk1 and I can confirm that I get the same issue.
Another workaround: if you use the jme3-jbullet
library for your physics (instead of jme3-bullet
), the issue should go away.
Apologies if this is a dumb question. How exactly do I swap out the jme3-bullet library with the jme3-jbullet library?
If you’re using the SDK and building your project with ANT:
- right-click on your project in the “Projects” window
- from the popup menu select “Properties…”
- in the dialog box under “Categories” select “Libraries”
- select the “Compile” tab (if it isn’t already selected)
- under “Compile-time Libraries” select
jme3-bullet
- left-click on the “Remove” button
- left-click on the “Add Library…” button
- select the
jme3-jbullet
library - left-click on the “Add Library” button
- left-click on the “OK” button
For completeness, you should also remove the jme3-bullet-native
library, but it’s not necessary.
Thank you, this resolved my issue.
i had the same issue, it had different gravity direction for linux and windows computers.
what is did is here:
not sure if in your case you can do exactly same, but hope it can help too.