[SOLVED] Cannot increase jump or fall speed

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.

2 Likes

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:
JBULLET:
jme3-bullet & jme3-jbullet (it should contain all the jars like stack alloc and vecmath!)
BULLET-NATIVE:
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:

JBULLET:
jme3-jbullet (it should contain all the jars like stack alloc and vecmath!)
BULLET-NATIVE:
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:

2 Likes

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

bullet-native:
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.

jbullet:
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:
com.jme3.bullet.*

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.

Headers? Why would a Java library contain headers? You mean classes, I think.

Apparently the jme3-jbullet library packaged with the 3.3.0-beta1 SDK is defective. Good to know.

1 Like

Classes, of course. :innocent:

For what it’s worth, the one in bintray is fine. 3.2.4 stable and 3.3.0 beta1 have the same class names in them… except 3.3.0 beta1 has some additional animation classes.

I made the wiki more clear on the adding of physics.

https://wiki.jmonkeyengine.org/jme3/jme3_source_structure.html#physics

2 Likes

By the way, jme3-jbullet is on BinTray, but not JCenter. Is this just an oversight, or is there a good reason?

Thank you, @mitm.

By the way, it’s okay to combine jme3-bullet-native and jme3-bullet-native-android in a single application. Those libraries don’t overlap the way jme3-bullet and jme3-jbullet do.

I have no idea why this happened.

1 Like

I clicked the “Add to JCenter” button on the package webpage, and got pink error popup saying that the version-control URL was invalid. I edited the URL and resubmitted the request. If all goes well, jme3-jbullet should be on JCenter within 24 hours.

The missing JCenter artifacts have been added, but of course that doesn’t resolve the OP’s issue.

I’ll experiment with HelloCollision and report back with my findings.

  1. The source code at https://wiki.jmonkeyengine.org/jme3/beginner/hello_collision.html is incompatible with jme3-jbullet. In jme3-jbullet, PhysicsControl does not provide a setGravity(Vector3f) method (only a setGravity(float) one). If you’re able to invoke PhysicsControl.setGravity(Vector3f), then you’re not using jme3-jbullet.

  2. In HelloCollision, setJumpSpeed() has no visible effect because its value is overridden when jump(new Vector3f(0,20f,0) is invoked in the onAction() method. If I replace jump(new Vector3f(0,20f,0) with jump(new Vector3f(0f,60f,0f)), then the player jumps faster and higher, as expected.

  3. setFallSpeed() sets the maximum fall speed, what’s sometimes called the terminal velocity. In the town setting, the easiest way to fall faster than 100 wu/second is to supply values larger than 100 to both setFallSpeed() and jump(). For instance, with setFallSpeed(300f) and jump(new Vector3f(0,200f,0)), the player reaches a speed of 200 wu/second just before landing.

1 Like