[SOLVED] Cannot increase jump or fall speed

I feel really ashamed to ask this, but I don’t know how to increase jump and fall speed. :astonished:

So I just took this example:

For me it looks like, that setJumpSpeed() has no effect and setFallSpeed() isn’t getting faster if I use values higher than 100 or so. I also played with gravity. What am I overlooking??

Well, I just wanted to migrate my projects from jME 3.0 to 3.2.4, but it seems I’m stuck with such stupid problem…

Any help appreciated…

PS: The game I wanted to migrate had gravity = 60.0f, but this makes the player fly, so now I use -0.5f. Obviously there was a change in the API.

1 Like

i dont have answer for question why setting speed dont work for CharacterControl.

But i just want to let you know that CharacterControl is “pseudo-physics” as i know. so gravity will probably not work there well.

fyi. BetterCharacterControl class is full physics based :slight_smile:, so here gravity make sense. (but its harder to configure properly)

Thanks! I already noticed that BetterCharacterControl exists, but I wanted to change only the minimum to get it running again. So far the theory…

Do you set jump before or after adding to physics space?

Just like in the example:
setJumpSpeed() before getPhysicsSpace().add() and jump() on keypress.

See what happens if you set them after adding to physics space.

Same result.

Maybe I’m missing a library? Should I upgrade to jME 3.3?

PS: I’m on Windows 10…

3.2.4 should be fine.

  • Are you using jbullet or bullet-native?
  • is there a getJumpSpeed()? If so could you check the value matches?
  • 3.3 certainly didn’t fix bugs in CharacterControl, so if something upgrading to BCC is easier. Or help us fix the bug
1 Like
  1. I replaced jme3-bullet-native.jar with jbullet.jar on classpath. No change.
  2. getJumpSpeed() returns the expected value
  3. I’d love to. Although I had other plans :wink:

Sorry, still using bullet-native… forgot to delete the .dll in project root.
But now complains about missing .dll. Adding jbullet didn’t do the trick. Let me see if I can track this down…

UPDATE: I forgot jme3-bullet.jar and vecmath.jar. Now all methods require different parameter values… Obviously jbullet and bullet-native are out of sync.

I moved everything around, set before gravity, after, set before physics after, set before gravity before physics, blagh blagh blagh and it shows it is set every time but it never changes the effect.

Its using the defaults of

    protected float fallSpeed = 55.0f;
    protected float jumpSpeed = 10.0f;

even though it shows the value you set it to.


Good to hear that, it seems I’m not crazy. Thanks for reproducing :slightly_smiling_face:

1 Like

When we can reproduce that it should be an easy fix.
FYI: jme3-bullet and jme3-jbullet should be exchangeable but it goes like this:
jme3-bullet & jme3-jbullet (it should contain all the jars like stack alloc and vecmath!)
jme3-bullet & jme3-bullet-native

You usually only interface with jme3-bullet, so nothing should change.

Edit: Looks like a serious bug, please try jbullet, because the issue stems from native code:

BetterCharacterControl uses forces to fake jumping.

JBullet does work btw.

1 Like

Actually, you shouldn’t include both jme3-bullet and jme3-jbullet in the classpath. They contain different versions of the same classes, so if you include both you might not get the JBullet versions. My recommendations for desktop developers would be:

jme3-jbullet (it should contain all the jars like stack alloc and vecmath!)
jme3-bullet & jme3-bullet-native

1 Like

Oh I didn’t know that, I thought jme3-bullet are the abstract interfaces like RigidBodyControl and jme3-jbullet and jme3-jbullet-native provide their implementations

1 Like

An important bugfix to jme3-bullet’s PhysicsCharacter (and CharacterControl) appears in JME 3.3 but not 3.2.4:



So I tried SDK v3.3.0-beta1-sdk1: Same results. :frowning_face:

Setting jump speed does not change anything.
Setting fall speed to 0 means no falling, 100 or so means maximum fall speed, but I want even more speed.

Same effect. UPDATE: Have to repeat test, lib/jar is broken, see below.

Side note to jbullet: I had to add both libraries: jme3-bullet and jme3-jbullet.
Otherwise there are unresolved references.
And in my Eclipse IDE I have to add vecmath, but you were talking about libraries, not jars. For Eclipse I have to add all jars of a library.

My guess: the bug fix covers the API differences between bullet and jbullet. So same values have same effects.

UPDATE fall speed comment

What unresolved references?

If you added both libraries, I’m unsure which one was actually used.

Using jME SDK 3.3.0 beta 1 (netbeans):
Add jme3-jbullet library, then these headers are missing:

UPDATE: The 3.2.4 jme3-jbullet jar contained these classes! So it’s a matter what version you use, which libraries you have to include.