Basically, gravity isn’t making me fall. The WASD/mouse movement is totally fine except for the Y axis. If I mouse up, I start floating, and if I jump, I float up forever. Also, not sure what’s supposed to happen if you step off the map, but that also doesn’t make me fall.
I’m using the sample code copy/pasted exactly. Can someone else run the code and tell me if it’s working right for you, please?
I just looked at the example code in the tutorial, and I noticed it doesn’t set the gravity on the BulletAppState itself, only the gravity for the player.
I haven’t used the bullet physics in a while so I don’t know for certain if it will help, but you could try adding this code and see if it fixes the problem.
Vector3f worldGrav = new Vector3f(0, -1, 0); //might take a float if you're running 3.1
bulletAppState.getPhysicsSpace().setGravity(worldGrav);
I wish I knew for sure if this was some problem with my set up or with the tutorial code
All the other tutorials so far (I’m working on the Effects one now) run just fine, and the collision detection itself in HelloCollision still works. In fact, I’ve figured out that if I fly under the level map before I jump that I stop floating up when I hit my head on the bottom of the level haha
So, since I saw mitm say that it was working on Windows, I’ve tried a few other environments:
linux/openjdk: doesn’t work
linux/oracle jdk: doesn’t work
windows10: works
is it possible that this is a bug in the linux version?
And I’ll try to find that info on the bullet libraries, but you’ll need to tell me how…
Bullet should be whatever the current defaults are? I only started using jmonkey within the last week
Gravity was changed for 3.2+. Looks like someone with Linux experience will need to help. The usual route for this seems to be update drivers or change libraries and such but I wouldn’t know where to start and if that even would help.
I know 3.1 stable sdk works using the old system but there has to be a reason this is happening and a way to fix this.