I have the same issue (v3.2.1-stable-sdk3 on Linux (Ubuntu)). I have been googling it for a while, but cannot find any solution. It looks like the setGravity(Vector3f) in PhysicsCharacter does not do anything.
When the player (CharacterControl) jumps, he starts floating to heaven (as OP nicely put it). If I aim down and press up (W) I can go down again (slowly). As soon as the player collides with another object, the upward motion (floating) stops.
Anybody a solution / hint?
Edit: sorry for the bump, but problem still exists (afaik)
I’ve experienced this issue before, I think you are supposed to put the setGravity after you attach the CharacterControl is added to the spatial or when it’s added to the rootNode. If it’s completly unrelated, then ignore me.
Ignoring would not be very polite, but I think it’s unrelated. I took the code from the beginner tutorial ‘Hello Collision’, and moving the call to setGravity() after adding the player to the physicsSpace doesn’t help…
maybe could be worth create new character control using basic physics methods - that works for everyone (because as i know this controls currently have own methods in native-bullet and jbullet, right?).
CharacterControl was working best for me on windows/linux, but seems there are more issues even with workarround about gravity.
No, the tutorial (when I copy-paste the code) doesn’t work. I keep flying after jumping (I never go down). It’s a nice zen-like experience, but not helpful in a game-setting.
AFAIK it’s only a problem in Linux in some environments.
Try removing the jme3-bullet and jme3-bullet-native libraries from your classpath and adding the jme3-jbullet library.
If you’re using the IDE, you’d do this by right-clicking on the project and selecting “Properties”, “Libraries” (under “Categories”) and using the “Remove” and “Add library…” buttons.
@sgold Thanks, that did the trick (after taking the example code and choosing the < jME3.2 version). But I understood from this forum (example) that the jbullet lib is being deprecated, in favor of the native bullet lib. Won’t this be a problem?